MCPcopy Create free account
hub / github.com/Gagravarr/VorbisJava / writeHeader

Method writeHeader

core/src/main/java/org/gagravarr/ogg/OggPage.java:256–272  ·  view source on GitHub ↗
(OutputStream out)

Source from the content-addressed store, hash-verified

254
255
256 public void writeHeader(OutputStream out) throws IOException {
257 byte[] header = getHeader();
258
259 // Ensure we've moved from tmpdata to data
260 getData();
261
262 // Generate the checksum and store
263 int crc = CRCUtils.getCRC(header);
264 if(data != null && data.length > 0) {
265 crc = CRCUtils.getCRC(data, crc);
266 }
267 IOUtils.putInt4(header, 22, crc);
268 checksum = crc;
269
270 // Write out
271 out.write(header);
272 }
273 /**
274 * Gets the header, but with a blank CRC field
275 */

Callers 2

testCRCMethod · 0.95
writePagesMethod · 0.80

Calls 5

getHeaderMethod · 0.95
getDataMethod · 0.95
getCRCMethod · 0.95
putInt4Method · 0.95
writeMethod · 0.65

Tested by 1

testCRCMethod · 0.76