@Override public void getBox(WritableByteChannel writableByteChannel) throws IOException { writableByteChannel.write(getHeader()); ByteBuffer byteBuffer = ByteBuffer.allocate(38); byteBuffer.position(6); IsoTypeWriter.writeUInt16(byteBuffer, dataReferenceIndex); IsoTypeWriter.writeUInt32(byteBuffer, displayFlags); IsoTypeWriter.writeUInt8(byteBuffer, horizontalJustification); IsoTypeWriter.writeUInt8(byteBuffer, verticalJustification); IsoTypeWriter.writeUInt8(byteBuffer, backgroundColorRgba[0]); IsoTypeWriter.writeUInt8(byteBuffer, backgroundColorRgba[1]); IsoTypeWriter.writeUInt8(byteBuffer, backgroundColorRgba[2]); IsoTypeWriter.writeUInt8(byteBuffer, backgroundColorRgba[3]); boxRecord.getContent(byteBuffer); styleRecord.getContent(byteBuffer); writableByteChannel.write((ByteBuffer) byteBuffer.rewind()); writeContainer(writableByteChannel); }
@Override public void getBox(WritableByteChannel writableByteChannel) throws IOException { writableByteChannel.write(getHeader()); ByteBuffer byteBuffer = ByteBuffer.allocate(38); byteBuffer.position(6); IsoTypeWriter.writeUInt16(byteBuffer, dataReferenceIndex); IsoTypeWriter.writeUInt32(byteBuffer, displayFlags); IsoTypeWriter.writeUInt8(byteBuffer, horizontalJustification); IsoTypeWriter.writeUInt8(byteBuffer, verticalJustification); IsoTypeWriter.writeUInt8(byteBuffer, backgroundColorRgba[0]); IsoTypeWriter.writeUInt8(byteBuffer, backgroundColorRgba[1]); IsoTypeWriter.writeUInt8(byteBuffer, backgroundColorRgba[2]); IsoTypeWriter.writeUInt8(byteBuffer, backgroundColorRgba[3]); boxRecord.getContent(byteBuffer); styleRecord.getContent(byteBuffer); writableByteChannel.write((ByteBuffer) byteBuffer.rewind()); writeContainer(writableByteChannel); }