final class JavaDataInput extends NiolInput
Niol wrapper around a DataInputStream.
- Alphabetic
- By Inheritance
- JavaDataInput
- NiolInput
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
new
JavaDataInput(in: DataInputStream)
- in
the DataInputStream to use
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
_read(): Byte
Implements read without necessarily checking for available data.
Implements read without necessarily checking for available data.
- Attributes
- protected[niol]
- Definition Classes
- JavaDataInput → NiolInput
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
def
close(): Unit
- Annotations
- @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
isEnded: Boolean
Checks if this input is closed or has definitively reached its end.
Checks if this input is closed or has definitively reached its end. If
isEnded == truethenisReadable == false.- returns
true if it's closed or has definitively reached its end, false otherwise
- Definition Classes
- JavaDataInput → NiolInput
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
isReadable: Boolean
* Checks if a byte can be read from this NiolInput.
* Checks if a byte can be read from this NiolInput.
- returns
true if at least one byte can be read, false otherwise
- Definition Classes
- JavaDataInput → NiolInput
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
def
r(): Byte
Reads a byte
Reads a byte
- Definition Classes
- NiolInput
-
def
read(dst: NiolBuffer): Unit
Fills the given NiolBuffer.
Fills the given NiolBuffer. Throws an exception if there isn't enough data available.
- dst
the buffer to fill
- Definition Classes
- JavaDataInput → NiolInput
-
def
read(dst: ByteBuffer): Unit
Fills the given ByteBuffer.
Fills the given ByteBuffer. Throws an exception if there isn't enough data available.
- dst
the buffer to fill
- Definition Classes
- JavaDataInput → NiolInput
-
def
readBool(): Boolean
Reads a boolean.
Reads a boolean.
- Definition Classes
- NiolInput
-
def
readBoolF(falseValue: Byte): Boolean
Reads one byte and returns false if it's equal to the given value, true otherwise.
Reads one byte and returns false if it's equal to the given value, true otherwise.
- Definition Classes
- NiolInput
-
def
readBoolT(trueValue: Byte): Boolean
Reads one byte and returns true if it's equal to the given value, false otherwise.
Reads one byte and returns true if it's equal to the given value, false otherwise.
- Definition Classes
- NiolInput
-
def
readBoolean(): Boolean
Reads a boolean
Reads a boolean
- Definition Classes
- NiolInput
-
final
def
readByte(): Byte
Reads a byte
Reads a byte
- Definition Classes
- NiolInput
-
def
readBytes(dest: Array[Byte], o: Int, l: Int): Unit
Reads the next
lengthbytes and put them intodstat the given offset.Reads the next
lengthbytes and put them intodstat the given offset. Throws an exception if there isn't enough data available.- Definition Classes
- JavaDataInput → NiolInput
-
def
readBytes(dst: Array[Byte]): Unit
Reads the next
dst.lengthbytes and put them intodst.Reads the next
dst.lengthbytes and put them intodst. Throws an exception if there isn't enough data to fill the array.- dst
the array to fill
- Definition Classes
- NiolInput
-
def
readBytes(n: Int): Array[Byte]
Reads the next
nbytes.Reads the next
nbytes. Throws an Exception if there isn't enough data available.- n
the number of bytes to read
- Definition Classes
- NiolInput
-
def
readChar(): Char
Reads a big-endian char
Reads a big-endian char
- Definition Classes
- NiolInput
-
def
readCharLE(): Char
Reads a little-endian char
Reads a little-endian char
- Definition Classes
- NiolInput
-
final
def
readCharSequence(bytesLength: Int, charset: Charset = UTF_8): CharSequence
Reads the next
bytesLengthbytes as a CharSequence encoded with the given charset.Reads the next
bytesLengthbytes as a CharSequence encoded with the given charset.- Definition Classes
- NiolInput
-
def
readDouble(): Double
Reads a big-endian 8-bytes double
Reads a big-endian 8-bytes double
- Definition Classes
- NiolInput
-
def
readDoubleLE(): Double
Reads a little-endian 8-bytes double
Reads a little-endian 8-bytes double
- Definition Classes
- NiolInput
-
def
readDoubles(dst: Array[Double], offset: Int, length: Int): Unit
Reads the next
lengthdoubles and put them intodstat the given offset.Reads the next
lengthdoubles and put them intodstat the given offset. Uses big-endian for each value. Throws an exception if there isn't enough data available.- dst
the array to fill
- offset
the first index to use
- length
the number of doubles to read
- Definition Classes
- NiolInput
-
def
readDoubles(dst: Array[Double]): Unit
Reads the next
dst.lengthdoubles and put them intodst.Reads the next
dst.lengthdoubles and put them intodst. Uses big-endian for each value. Throws an exception if there isn't enough data to fill the array.- dst
the array to fill
- Definition Classes
- NiolInput
-
def
readDoubles(n: Int): Array[Double]
Reads the next
ndoubles.Reads the next
ndoubles. Uses big-endian for each value. Throws an Exception if there isn't enough data available.- n
the number of doubles to read
- Definition Classes
- NiolInput
-
def
readDoublesLE(dst: Array[Double], offset: Int, length: Int): Unit
Reads the next
lengthdoubles and put them intodstat the given offset.Reads the next
lengthdoubles and put them intodstat the given offset. Uses little-endian for each value. Throws an exception if there isn't enough data available.- dst
the array to fill
- offset
the first index to use
- length
the number of doubles to read
- Definition Classes
- NiolInput
-
def
readDoublesLE(dst: Array[Double]): Unit
Reads the next
dst.lengthdoubles and put them intodst.Reads the next
dst.lengthdoubles and put them intodst. Uses little-endian for each value. Throws an exception if there isn't enough data to fill the array.- dst
the array to fill
- Definition Classes
- NiolInput
-
def
readDoublesLE(n: Int): Array[Double]
Reads the next
ndoubles.Reads the next
ndoubles. Uses little-endian for each value. Throws an Exception if there isn't enough data available.- n
the number of doubles to read
- Definition Classes
- NiolInput
-
def
readFloat(): Float
Reads a big-endian 4-bytes float
Reads a big-endian 4-bytes float
- Definition Classes
- NiolInput
-
def
readFloatLE(): Float
Reads a little-endian 4-bytes float
Reads a little-endian 4-bytes float
- Definition Classes
- NiolInput
-
def
readFloats(dst: Array[Float], offset: Int, length: Int): Unit
Reads the next
lengthfloats and put them intodstat the given offset.Reads the next
lengthfloats and put them intodstat the given offset. Uses big-endian for each value. Throws an exception if there isn't enough data available.- dst
the array to fill
- offset
the first index to use
- length
the number of floats to read
- Definition Classes
- NiolInput
-
def
readFloats(dst: Array[Float]): Unit
Reads the next
dst.lengthfloats and put them intodst.Reads the next
dst.lengthfloats and put them intodst. Uses big-endian for each value. Throws an exception if there isn't enough data to fill the array.- dst
the array to fill
- Definition Classes
- NiolInput
-
def
readFloats(n: Int): Array[Float]
Reads the next
nfloats.Reads the next
nfloats. Uses big-endian for each value. Throws an Exception if there isn't enough data available.- n
the number of floats to read
- Definition Classes
- NiolInput
-
def
readFloatsLE(dst: Array[Float], offset: Int, length: Int): Unit
Reads the next
lengthfloats and put them intodstat the given offset.Reads the next
lengthfloats and put them intodstat the given offset. Uses little-endian for each value. Throws an exception if there isn't enough data available.- dst
the array to fill
- offset
the first index to use
- length
the number of floats to read
- Definition Classes
- NiolInput
-
def
readFloatsLE(dst: Array[Float]): Unit
Reads the next
dst.lengthfloats and put them intodst.Reads the next
dst.lengthfloats and put them intodst. Uses little-endian for each value. Throws an exception if there isn't enough data to fill the array.- dst
the array to fill
- Definition Classes
- NiolInput
-
def
readFloatsLE(n: Int): Array[Float]
Reads the next
nfloats.Reads the next
nfloats. Uses little-endian for each value. Throws an Exception if there isn't enough data available.- n
the number of floats to read
- Definition Classes
- NiolInput
-
def
readInt(): Int
Reads a big-endian 4-bytes integer
Reads a big-endian 4-bytes integer
- Definition Classes
- NiolInput
-
def
readIntLE(): Int
Reads a little-endian 4-bytes integer
Reads a little-endian 4-bytes integer
- Definition Classes
- NiolInput
-
def
readInts(dst: Array[Int], offset: Int, length: Int): Unit
Reads the next
lengthints and put them intodstat the given offset.Reads the next
lengthints and put them intodstat the given offset. Uses big-endian for each value. Throws an exception if there isn't enough data available.- dst
the array to fill
- offset
the first index to use
- length
the number of ints to read
- Definition Classes
- NiolInput
-
def
readInts(dst: Array[Int]): Unit
Reads the next
dst.lengthints and put them intodst.Reads the next
dst.lengthints and put them intodst. Uses big-endian for each value. Throws an exception if there isn't enough data to fill the array.- dst
the array to fill
- Definition Classes
- NiolInput
-
def
readInts(n: Int): Array[Int]
Reads the next
nints.Reads the next
nints. Uses big-endian for each value. Throws an Exception if there isn't enough data available.- n
the number of ints to read
- Definition Classes
- NiolInput
-
def
readIntsLE(dst: Array[Int], offset: Int, length: Int): Unit
Reads the next
lengthints and put them intodstat the given offset.Reads the next
lengthints and put them intodstat the given offset. Uses little-endian for each value. Throws an exception if there isn't enough data available.- dst
the array to fill
- offset
the first index to use
- length
the number of ints to read
- Definition Classes
- NiolInput
-
def
readIntsLE(dst: Array[Int]): Unit
Reads the next
dst.lengthints and put them intodst.Reads the next
dst.lengthints and put them intodst. Uses little-endian for each value. Throws an exception if there isn't enough data to fill the array.- dst
the array to fill
- Definition Classes
- NiolInput
-
def
readIntsLE(n: Int): Array[Int]
Reads the next
nints.Reads the next
nints. Uses little-endian for each value. Throws an Exception if there isn't enough data available.- n
the number of ints to read
- Definition Classes
- NiolInput
-
def
readLong(): Long
Reads a big-endian 8-bytes integer
Reads a big-endian 8-bytes integer
- Definition Classes
- NiolInput
-
def
readLongLE(): Long
Reads a little-endian 8-bytes integer
Reads a little-endian 8-bytes integer
- Definition Classes
- NiolInput
-
def
readLongs(dst: Array[Long], offset: Int, length: Int): Unit
Reads the next
lengthlongs and put them intodstat the given offset.Reads the next
lengthlongs and put them intodstat the given offset. Uses big-endian for each value. Throws an exception if there isn't enough data available.- dst
the array to fill
- offset
the first index to use
- length
the number of longs to read
- Definition Classes
- NiolInput
-
def
readLongs(dst: Array[Long]): Unit
Reads the next
dst.lengthlongs and put them intodst.Reads the next
dst.lengthlongs and put them intodst. Uses big-endian for each value. Throws an exception if there isn't enough data to fill the array.- dst
the array to fill
- Definition Classes
- NiolInput
-
def
readLongs(n: Int): Array[Long]
Reads the next
nlongs.Reads the next
nlongs. Uses big-endian for each value. Throws an Exception if there isn't enough data available.- n
the number of longs to read
- Definition Classes
- NiolInput
-
def
readLongsLE(dst: Array[Long], offset: Int, length: Int): Unit
Reads the next
lengthlongs and put them intodstat the given offset.Reads the next
lengthlongs and put them intodstat the given offset. Uses little-endian for each value. Throws an exception if there isn't enough data available.- dst
the array to fill
- offset
the first index to use
- length
the number of longs to read
- Definition Classes
- NiolInput
-
def
readLongsLE(dst: Array[Long]): Unit
Reads the next
dst.lengthlongs and put them intodst.Reads the next
dst.lengthlongs and put them intodst. Uses little-endian for each value. Throws an exception if there isn't enough data to fill the array.- dst
the array to fill
- Definition Classes
- NiolInput
-
def
readLongsLE(n: Int): Array[Long]
Reads the next
nlongs.Reads the next
nlongs. Uses little-endian for each value. Throws an Exception if there isn't enough data available.- n
the number of longs to read
- Definition Classes
- NiolInput
-
def
readMedium(): Int
Reads a big-endian 3-bytes integer
Reads a big-endian 3-bytes integer
- Definition Classes
- NiolInput
-
def
readMediumLE(): Int
Reads a little-endian 3-bytes integer
Reads a little-endian 3-bytes integer
- Definition Classes
- NiolInput
-
final
def
readSVarIntZigZag(maxBytes: Int = 5): Int
Reads a variable-length int using the signed/zig-zag encoding.
Reads a variable-length int using the signed/zig-zag encoding.
- Definition Classes
- NiolInput
-
final
def
readSVarLongZigZag(maxBytes: Int = 10): Long
Reads a variable-length long using the signed/zig-zag encoding.
Reads a variable-length long using the signed/zig-zag encoding.
- Definition Classes
- NiolInput
-
def
readShort(): Short
Reads a big-endian short
Reads a big-endian short
- Definition Classes
- NiolInput
-
final
def
readShortCharSequence(charset: Charset = UTF_8): CharSequence
Reads a big-endian unsigned short to determine the sequence's length, then reads it.
Reads a big-endian unsigned short to determine the sequence's length, then reads it.
- Definition Classes
- NiolInput
-
final
def
readShortCharSequenceLE(charset: Charset = UTF_8): CharSequence
Reads a little-endian unsigned short to determine the sequence's length, then reads it.
Reads a little-endian unsigned short to determine the sequence's length, then reads it.
- Definition Classes
- NiolInput
-
def
readShortLE(): Short
Reads a little-endian short
Reads a little-endian short
- Definition Classes
- NiolInput
-
final
def
readShortString(charset: Charset = UTF_8): String
Reads a big-endian unsigned short to determine the string's length, then reads it.
Reads a big-endian unsigned short to determine the string's length, then reads it.
- Definition Classes
- NiolInput
-
final
def
readShortStringLE(charset: Charset = UTF_8): String
Reads a little-endian unsigned short to determine the string's length, then reads it.
Reads a little-endian unsigned short to determine the string's length, then reads it.
- Definition Classes
- NiolInput
-
def
readShorts(dst: Array[Short], offset: Int, length: Int): Unit
Reads the next
lengthshorts and put them intodstat the given offset.Reads the next
lengthshorts and put them intodstat the given offset. Uses big-endian for each value. Throws an exception if there isn't enough data available.- dst
the array to fill
- offset
the first index to use
- length
the number of shorts to read
- Definition Classes
- NiolInput
-
def
readShorts(dst: Array[Short]): Unit
Reads the next
dst.lengthshorts and put them intodst.Reads the next
dst.lengthshorts and put them intodst. Uses big-endian for each value. Throws an exception if there isn't enough data to fill the array.- dst
the array to fill
- Definition Classes
- NiolInput
-
def
readShorts(n: Int): Array[Short]
Reads the next
nshorts.Reads the next
nshorts. Uses big-endian for each value. Throws an Exception if there isn't enough data available.- n
the number of shorts to read
- Definition Classes
- NiolInput
-
def
readShortsLE(dst: Array[Short], offset: Int, length: Int): Unit
Reads the next
lengthshorts and put them intodstat the given offset.Reads the next
lengthshorts and put them intodstat the given offset. Uses little-endian for each value. Throws an exception if there isn't enough data available.- dst
the array to fill
- offset
the first index to use
- length
the number of shorts to read
- Definition Classes
- NiolInput
-
def
readShortsLE(dst: Array[Short]): Unit
Reads the next
dst.lengthshorts and put them intodst.Reads the next
dst.lengthshorts and put them intodst. Uses little-endian for each value. Throws an exception if there isn't enough data to fill the array.- dst
the array to fill
- Definition Classes
- NiolInput
-
def
readShortsLE(n: Int): Array[Short]
Reads the next
nshorts.Reads the next
nshorts. Uses little-endian for each value. Throws an Exception if there isn't enough data available.- n
the number of shorts to read
- Definition Classes
- NiolInput
-
def
readSome(dst: NiolBuffer): Int
Reads at most
dst.writableBytesbytes intodst.Reads at most
dst.writableBytesbytes intodst. The buffer's position will be advanced by the number of bytes read from this NiolInput.- dst
the buffer to fill
- Definition Classes
- JavaDataInput → NiolInput
-
def
readSome(dst: ByteBuffer): Int
Reads at most
dst.remaining()bytes intodst.Reads at most
dst.remaining()bytes intodst. The buffer's position will be advanced by the number of bytes read from this NiolInput.- dst
the buffer to fill
- Definition Classes
- JavaDataInput → NiolInput
-
def
readSomeBytes(dst: Array[Byte], offset: Int, maxLength: Int): Int
Reads at most
lengthbytes and put them intodstat the given offset.Reads at most
lengthbytes and put them intodstat the given offset. Returns the actual number of bytes read, possibly zero.- dst
the array to fill
- offset
the first index to use
- maxLength
the maximum number of bytes to read
- returns
the number of bytes read
- Definition Classes
- NiolInput
-
def
readSomeBytes(dst: Array[Byte]): Int
Reads at most
dst.lengthbytes intodst.Reads at most
dst.lengthbytes intodst. Returns the actual number of bytes read, possibly zero.- dst
the array to fill
- returns
the number of bytes read
- Definition Classes
- NiolInput
-
final
def
readString(bytesLength: Int, charset: Charset = UTF_8): String
Reads the next
bytesLengthbytes as a String encoded with the given charset.Reads the next
bytesLengthbytes as a String encoded with the given charset.- Definition Classes
- NiolInput
-
final
def
readUUID(): UUID
Reads a big-endian 16-bytes UUID
Reads a big-endian 16-bytes UUID
- Definition Classes
- NiolInput
-
final
def
readUnsignedByte(): Int
Reads an unsigned byte as an int
Reads an unsigned byte as an int
- Definition Classes
- NiolInput
-
final
def
readUnsignedInt(): Long
Reads a big-endian unsigned int as a long
Reads a big-endian unsigned int as a long
- Definition Classes
- NiolInput
-
final
def
readUnsignedIntLE(): Long
Reads a little-endian unsigned int as a long
Reads a little-endian unsigned int as a long
- Definition Classes
- NiolInput
-
final
def
readUnsignedMedium(): Int
Reads a big-endian unsigned medium as an int
Reads a big-endian unsigned medium as an int
- Definition Classes
- NiolInput
-
final
def
readUnsignedMediumLE(): Int
Reads a little-endian unsigned medium as an int
Reads a little-endian unsigned medium as an int
- Definition Classes
- NiolInput
-
final
def
readUnsignedShort(): Int
Reads a big-endian unsigned short as an int
Reads a big-endian unsigned short as an int
- Definition Classes
- NiolInput
-
final
def
readUnsignedShortLE(): Int
Reads a little-endian unsigned short as an int
Reads a little-endian unsigned short as an int
- Definition Classes
- NiolInput
-
final
def
readVarCharSequence(charset: Charset = UTF_8): CharSequence
Reads a VarInt to determine the sequence's length, then reads the CharSequence.
Reads a VarInt to determine the sequence's length, then reads the CharSequence.
- Definition Classes
- NiolInput
-
def
readVarInt(maxBytes: Int = 5): Int
Reads a variable-length int using the normal/unsigned encoding.
Reads a variable-length int using the normal/unsigned encoding.
- Definition Classes
- NiolInput
-
def
readVarLong(maxBytes: Int = 10): Long
Reads a variable-length long using the normal/unsigned encoding.
Reads a variable-length long using the normal/unsigned encoding.
- Definition Classes
- NiolInput
-
final
def
readVarString(charset: Charset = UTF_8): String
Reads a VarInt to determine the string's length, then reads the string.
Reads a VarInt to determine the string's length, then reads the string.
- Definition Classes
- NiolInput
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
def
tryRead(): Int
Attempts to read a byte.
Attempts to read a byte. If the input is empty, returns -1. Otherwise, returns the byte value as an int in the range 0-255.
- returns
the byte value in range 0-255, or -1 if the input is empty
- Definition Classes
- JavaDataInput → NiolInput
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()