org.apache.sanselan.common
Class BinaryFileParser
java.lang.Object
org.apache.sanselan.common.BinaryFileFunctions
org.apache.sanselan.common.BinaryFileParser
- All Implemented Interfaces:
- BinaryConstants
- Direct Known Subclasses:
- ExifRewriter, IccProfileParser, ImageParser, IPTCParser, JpegRewriter, JpegUtils, JpegXmpParser, PNGChunk, ScanExpediter, Segment, TiffReader, TransparencyFilter
public class BinaryFileParser
- extends BinaryFileFunctions
Method Summary |
static boolean |
byteArrayHasPrefix(byte[] bytes,
byte[] prefix)
|
protected int |
convertByteArrayToInt(java.lang.String name,
byte[] bytes)
|
protected int |
convertByteArrayToInt(java.lang.String name,
int start,
byte[] bytes)
|
int |
convertByteArrayToShort(java.lang.String name,
byte[] bytes)
|
int |
convertByteArrayToShort(java.lang.String name,
int start,
byte[] bytes)
|
protected int |
getByteOrder()
|
protected byte[] |
int2ToByteArray(int value)
|
int |
read2Bytes(java.lang.String name,
java.io.InputStream is,
java.lang.String exception)
|
int |
read3Bytes(java.lang.String name,
java.io.InputStream is,
java.lang.String exception)
|
int |
read4Bytes(java.lang.String name,
java.io.InputStream is,
java.lang.String exception)
|
protected void |
setByteOrder(int byteOrder)
|
protected void |
setByteOrder(int a,
int b)
|
Methods inherited from class org.apache.sanselan.common.BinaryFileFunctions |
CharsToQuad, compareByteArrays, compareByteArrays, compareBytes, compareBytes, convertByteArrayToDouble, convertByteArrayToDouble, convertByteArrayToDoubleArray, convertByteArrayToFloat, convertByteArrayToFloat, convertByteArrayToFloatArray, convertByteArrayToInt, convertByteArrayToInt, convertByteArrayToIntArray, convertByteArrayToRational, convertByteArrayToRational, convertByteArrayToRationalArray, convertByteArrayToShort, convertByteArrayToShort, convertByteArrayToShortArray, convertDoubleArrayToByteArray, convertDoubleToByteArray, convertFloatArrayToByteArray, convertFloatToByteArray, convertIntArrayToByteArray, convertIntArrayToRationalArray, convertRationalArrayToByteArray, convertRationalToByteArray, convertShortArrayToByteArray, convertShortToByteArray, copyStreamToStream, debugByteArray, debugNumber, debugNumber, debugNumber, debugNumber, debugNumberArray, findNull, findNull, getBytearrayHead, getByteArrayTail, getDebug, getRAFBytes, getStreamBytes, head, int2ToByteArray, printByteBits, printCharQuad, printCharQuad, read2Bytes, read3Bytes, read4Bytes, readAndVerifyBytes, readAndVerifyBytes, readByte, readBytearray, readByteArray, readByteArray, readBytes, readRandomBytes, scanForByte, setDebug, skipBytes, skipBytes, slice, startsWith, tail, writeIntInToByteArray |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BinaryFileParser
public BinaryFileParser(int byteOrder)
BinaryFileParser
public BinaryFileParser()
setByteOrder
protected void setByteOrder(int a,
int b)
throws ImageReadException,
java.io.IOException
- Throws:
ImageReadException
java.io.IOException
setByteOrder
protected void setByteOrder(int byteOrder)
getByteOrder
protected int getByteOrder()
convertByteArrayToInt
protected final int convertByteArrayToInt(java.lang.String name,
int start,
byte[] bytes)
convertByteArrayToInt
protected final int convertByteArrayToInt(java.lang.String name,
byte[] bytes)
convertByteArrayToShort
public final int convertByteArrayToShort(java.lang.String name,
byte[] bytes)
throws ImageReadException
- Throws:
ImageReadException
convertByteArrayToShort
public final int convertByteArrayToShort(java.lang.String name,
int start,
byte[] bytes)
throws ImageReadException
- Throws:
ImageReadException
read4Bytes
public final int read4Bytes(java.lang.String name,
java.io.InputStream is,
java.lang.String exception)
throws ImageReadException,
java.io.IOException
- Throws:
ImageReadException
java.io.IOException
read3Bytes
public final int read3Bytes(java.lang.String name,
java.io.InputStream is,
java.lang.String exception)
throws ImageReadException,
java.io.IOException
- Throws:
ImageReadException
java.io.IOException
read2Bytes
public final int read2Bytes(java.lang.String name,
java.io.InputStream is,
java.lang.String exception)
throws ImageReadException,
java.io.IOException
- Throws:
ImageReadException
java.io.IOException
byteArrayHasPrefix
public static boolean byteArrayHasPrefix(byte[] bytes,
byte[] prefix)
int2ToByteArray
protected final byte[] int2ToByteArray(int value)
Copyright © 2007-2009. All Rights Reserved.