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 BufferedInputStreamprotected booleanprotected booleanprotected longprotected GenericOutputChannelprotected DataInputStream -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()getAllDataFiles(String binaryFileList, String firstFile) voidlongbytereadByte()intreadByteArray(byte[] b, int off, int len) byte[]readBytes(int n) doublefloatintreadInt()intlongreadLong()shortreadString(int nChar) intintvoidseek(long offset) voidsetBigEndian(boolean b) voidvoidsetRandom(boolean TF) setStream(BufferedInputStream bis, boolean isBigEndian) voidsetStreamData(DataInputStream stream, boolean isBigEndian) intswapBytesI(int n) shortswapBytesS(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:
closein interfaceGenericBinaryDocument
-
setStream
- Specified by:
setStreamin interfaceGenericBinaryDocument
-
getInputStream
- Specified by:
getInputStreamin interfaceGenericBinaryDocument
-
setStreamData
- Specified by:
setStreamDatain interfaceGenericBinaryDocument
-
setOutputChannel
- Specified by:
setOutputChannelin interfaceGenericBinaryDocument
-
setRandom
public void setRandom(boolean TF) -
readByte
- Specified by:
readBytein interfaceGenericBinaryDocumentReader- Throws:
IOException
-
readUInt8
- Specified by:
readUInt8in interfaceGenericBinaryDocumentReader- Throws:
IOException
-
readBytes
- Specified by:
readBytesin interfaceGenericBinaryDocumentReader- Throws:
IOException
-
readByteArray
- Specified by:
readByteArrayin interfaceGenericBinaryDocument- Throws:
IOException
-
readString
- Specified by:
readStringin interfaceGenericBinaryDocumentReader- Throws:
IOException
-
readShort
- Specified by:
readShortin interfaceGenericBinaryDocumentReader- Throws:
IOException
-
readIntLE
- Specified by:
readIntLEin interfaceGenericBinaryDocument- Throws:
IOException
-
readInt
- Specified by:
readIntin interfaceGenericBinaryDocumentReader- Throws:
IOException
-
swapBytesI
public int swapBytesI(int n) - Specified by:
swapBytesIin interfaceGenericBinaryDocument
-
swapBytesS
public short swapBytesS(short n) - Specified by:
swapBytesSin interfaceGenericBinaryDocument
-
readUnsignedShort
- Specified by:
readUnsignedShortin interfaceGenericBinaryDocumentReader- Throws:
IOException
-
readLong
- Specified by:
readLongin interfaceGenericBinaryDocumentReader- Throws:
IOException
-
readFloat
- Specified by:
readFloatin interfaceGenericBinaryDocumentReader- Throws:
Exception
-
readDouble
- Specified by:
readDoublein interfaceGenericBinaryDocumentReader- Throws:
IOException
-
seek
public void seek(long offset) - Specified by:
seekin interfaceGenericBinaryDocumentReader
-
getPosition
public long getPosition()- Specified by:
getPositionin interfaceGenericBinaryDocumentReader
-
getAllDataFiles
- Specified by:
getAllDataFilesin interfaceGenericBinaryDocument
-
getAllDataMapped
- Specified by:
getAllDataMappedin interfaceGenericBinaryDocument
-
setBigEndian
public void setBigEndian(boolean b) - Specified by:
setBigEndianin interfaceGenericBinaryDocumentReader
-