class ImageExtractor.GifFileReader.HeaderReader
extends java.lang.Object
Constructor and Description |
---|
HeaderReader() |
Modifier and Type | Method and Description |
---|---|
boolean |
hasSignature(byte firstByte,
byte secondByte,
byte thirdByte)
Tests that the given first three bytes match the GIF signature.
|
boolean |
hasVersion(byte firstByte,
byte secondByte,
byte thirdByte)
Tests that the given next three bytes match the correct GIF version.
|
boolean |
testHeader(java.io.RandomAccessFile raf)
Tests if the first six sequential bytes form the GIF Header.
|
public boolean testHeader(java.io.RandomAccessFile raf) throws java.io.IOException
raf
- The data represented by the random access filejava.io.IOException
- If IO error occurs while reading data and moving the current file pointer.public boolean hasSignature(byte firstByte, byte secondByte, byte thirdByte)
firstByte
- The first byte to matchsecondByte
- The second byte to matchthirdByte
- The third byte to matchpublic boolean hasVersion(byte firstByte, byte secondByte, byte thirdByte)
firstByte
- The first byte to matchsecondByte
- The second byte to matchthirdByte
- The third byte to match