Package org.basex.io.in
Class DataInput
java.lang.Object
java.io.InputStream
org.basex.io.in.BufferInput
org.basex.io.in.DataInput
- All Implemented Interfaces:
Closeable,AutoCloseable
This is an input stream for project specific data types.
It bears resemblance to Java's
DataInputStream.- Author:
- BaseX Team 2005-21, BSD License, Christian Gruen
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanreadBool()Reads a boolean value.Reads a distance-mapped integer array.doubleReads a double value.long[]readLongs(int s) Reads an array of long values.intreadNum()Reads a compressed integer value; seeNumfor more.int[]readNums()Reads a compressed integer array.byte[]Reads a token, represented by its compressed length and its byte array.byte[][]Reads a token array.Methods inherited from class org.basex.io.in.BufferInput
close, content, get, get, io, length, mark, markSupported, read, readBytes, readString, reset, sizeMethods inherited from class java.io.InputStream
available, nullInputStream, read, read, readAllBytes, readNBytes, readNBytes, skip, skipNBytes, transferTo
-
Constructor Details
-
DataInput
Constructor.- Parameters:
io- the input to be read- Throws:
IOException- I/O Exception
-
-
Method Details
-
readBool
Reads a boolean value.- Returns:
- boolean value
- Throws:
IOException- I/O Exception
-
readToken
Reads a token, represented by its compressed length and its byte array.- Returns:
- byte array
- Throws:
IOException- I/O Exception
-
readDouble
Reads a double value.- Returns:
- byte array
- Throws:
IOException- I/O Exception
-
readDiffs
Reads a distance-mapped integer array.- Returns:
- integer array
- Throws:
IOException- I/O Exception
-
readNums
Reads a compressed integer array.- Returns:
- integer array
- Throws:
IOException- I/O Exception
-
readTokens
Reads a token array.- Returns:
- double array
- Throws:
IOException- I/O Exception
-
readNum
Reads a compressed integer value; seeNumfor more.- Returns:
- read value
- Throws:
IOException- I/O Exception
-
readLongs
Reads an array of long values.- Parameters:
s- array size- Returns:
- array of longs
- Throws:
IOException- I/O Exception
-