@Override public void parse(ReadableByteChannel dataSource, ByteBuffer header, long contentSize, BoxParser boxParser) throws IOException { ByteBuffer content = ByteBuffer.allocate(38); dataSource.read(content); content.position(6); dataReferenceIndex = IsoTypeReader.readUInt16(content); displayFlags = IsoTypeReader.readUInt32(content); horizontalJustification = IsoTypeReader.readUInt8(content); verticalJustification = IsoTypeReader.readUInt8(content); backgroundColorRgba = new int[4]; backgroundColorRgba[0] = IsoTypeReader.readUInt8(content); backgroundColorRgba[1] = IsoTypeReader.readUInt8(content); backgroundColorRgba[2] = IsoTypeReader.readUInt8(content); backgroundColorRgba[3] = IsoTypeReader.readUInt8(content); boxRecord = new BoxRecord(); boxRecord.parse(content); styleRecord = new StyleRecord(); styleRecord.parse(content); initContainer(dataSource, contentSize - 38, boxParser); }
@Override public void parse(ReadableByteChannel dataSource, ByteBuffer header, long contentSize, BoxParser boxParser) throws IOException { ByteBuffer content = ByteBuffer.allocate(38); dataSource.read(content); content.position(6); dataReferenceIndex = IsoTypeReader.readUInt16(content); displayFlags = IsoTypeReader.readUInt32(content); horizontalJustification = IsoTypeReader.readUInt8(content); verticalJustification = IsoTypeReader.readUInt8(content); backgroundColorRgba = new int[4]; backgroundColorRgba[0] = IsoTypeReader.readUInt8(content); backgroundColorRgba[1] = IsoTypeReader.readUInt8(content); backgroundColorRgba[2] = IsoTypeReader.readUInt8(content); backgroundColorRgba[3] = IsoTypeReader.readUInt8(content); boxRecord = new BoxRecord(); boxRecord.parse(content); styleRecord = new StyleRecord(); styleRecord.parse(content); initContainer(dataSource, contentSize - 38, boxParser); }