This operation causes the stream pointer to advance after the read data.
143144145146147148149150151152153
int index = 4; stream.seek(index); byte[] markerBytes = new byte[2]; while(true) { index += stream.readUnsignedShort(); stream.seek(index); stream.read(markerBytes); index += 2;
157158159160161162163164165166167
{ stream.skip(2); // Get the image bits per color component (sample precision)! setBitsPerComponent(stream.readUnsignedByte()); // Get the image size! setHeight(stream.readUnsignedShort()); setWidth(stream.readUnsignedShort()); break; } }
158159160161162163164165166167168
stream.skip(2); // Get the image bits per color component (sample precision)! setBitsPerComponent(stream.readUnsignedByte()); // Get the image size! setHeight(stream.readUnsignedShort()); setWidth(stream.readUnsignedShort()); break; } } }