Package javajs.util
Class BinaryDocument
java.lang.Object
javajs.util.BC
javajs.util.BinaryDocument
- All Implemented Interfaces:
GenericBinaryDocument
,GenericBinaryDocumentReader
- Direct Known Subclasses:
CompoundDocument
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected BufferedInputStream
protected boolean
protected boolean
protected long
protected GenericOutputChannel
protected DataInputStream
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
getAllDataFiles
(String binaryFileList, String firstFile) void
long
byte
readByte()
int
readByteArray
(byte[] b, int off, int len) byte[]
readBytes
(int n) double
float
int
readInt()
int
long
readLong()
short
readString
(int nChar) int
int
void
seek
(long offset) void
setBigEndian
(boolean b) void
void
setRandom
(boolean TF) setStream
(BufferedInputStream bis, boolean isBigEndian) void
setStreamData
(DataInputStream stream, boolean isBigEndian) int
swapBytesI
(int n) short
swapBytesS
(short n) Methods inherited from class javajs.util.BC
bytesToDoubleToFloat, bytesToFloat, bytesToInt, bytesToShort, intToFloat, intToSignedInt
-
Field Details
-
stream
-
isRandom
protected boolean isRandom -
isBigEndian
protected boolean isBigEndian -
bis
-
nBytes
protected long nBytes -
out
-
-
Constructor Details
-
BinaryDocument
public BinaryDocument()
-
-
Method Details
-
close
public void close()- Specified by:
close
in interfaceGenericBinaryDocument
-
setStream
- Specified by:
setStream
in interfaceGenericBinaryDocument
-
getInputStream
- Specified by:
getInputStream
in interfaceGenericBinaryDocument
-
setStreamData
- Specified by:
setStreamData
in interfaceGenericBinaryDocument
-
setOutputChannel
- Specified by:
setOutputChannel
in interfaceGenericBinaryDocument
-
setRandom
public void setRandom(boolean TF) -
readByte
- Specified by:
readByte
in interfaceGenericBinaryDocumentReader
- Throws:
IOException
-
readUInt8
- Specified by:
readUInt8
in interfaceGenericBinaryDocumentReader
- Throws:
IOException
-
readBytes
- Specified by:
readBytes
in interfaceGenericBinaryDocumentReader
- Throws:
IOException
-
readByteArray
- Specified by:
readByteArray
in interfaceGenericBinaryDocument
- Throws:
IOException
-
readString
- Specified by:
readString
in interfaceGenericBinaryDocumentReader
- Throws:
IOException
-
readShort
- Specified by:
readShort
in interfaceGenericBinaryDocumentReader
- Throws:
IOException
-
readIntLE
- Specified by:
readIntLE
in interfaceGenericBinaryDocument
- Throws:
IOException
-
readInt
- Specified by:
readInt
in interfaceGenericBinaryDocumentReader
- Throws:
IOException
-
swapBytesI
public int swapBytesI(int n) - Specified by:
swapBytesI
in interfaceGenericBinaryDocument
-
swapBytesS
public short swapBytesS(short n) - Specified by:
swapBytesS
in interfaceGenericBinaryDocument
-
readUnsignedShort
- Specified by:
readUnsignedShort
in interfaceGenericBinaryDocumentReader
- Throws:
IOException
-
readLong
- Specified by:
readLong
in interfaceGenericBinaryDocumentReader
- Throws:
IOException
-
readFloat
- Specified by:
readFloat
in interfaceGenericBinaryDocumentReader
- Throws:
Exception
-
readDouble
- Specified by:
readDouble
in interfaceGenericBinaryDocumentReader
- Throws:
IOException
-
seek
public void seek(long offset) - Specified by:
seek
in interfaceGenericBinaryDocument
-
getPosition
public long getPosition()- Specified by:
getPosition
in interfaceGenericBinaryDocument
-
getAllDataFiles
- Specified by:
getAllDataFiles
in interfaceGenericBinaryDocument
-
getAllDataMapped
- Specified by:
getAllDataMapped
in interfaceGenericBinaryDocument
-
setBigEndian
public void setBigEndian(boolean b) - Specified by:
setBigEndian
in interfaceGenericBinaryDocumentReader
-