abstract class ProxyByteReader extends ByteReader
A proxy ByteReader that forwards all calls to another ByteReader. This is useful if you want to wrap-but-modify an existing ByteReader.
- Alphabetic
- By Inheritance
- ProxyByteReader
- ByteReader
- AutoCloseable
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new ProxyByteReader(underlying: ByteReader)
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
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def close(): Unit
- Definition Classes
- ProxyByteReader → AutoCloseable
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- 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 process(processor: Processor): Int
Process the underlying buffer 1-byte at a time using the given Buf.Processor, starting at index
0
of the underlying buffer until indexlength
of the underlying buffer.Process the underlying buffer 1-byte at a time using the given Buf.Processor, starting at index
0
of the underlying buffer until indexlength
of the underlying buffer. Processing will halt if the processor returnsfalse
or after processing the final byte.- returns
-1 if the processor processed all bytes or the last processed index if the processor returns
false
.
- Definition Classes
- ProxyByteReader → ByteReader
- Note
this does not advance the byte cursor.
- def process(from: Int, until: Int, processor: Processor): Int
Process the underlying buffer 1-byte at a time using the given Buf.Processor, starting at index
from
of the underlying buffer until indexuntil
of the underlying buffer.Process the underlying buffer 1-byte at a time using the given Buf.Processor, starting at index
from
of the underlying buffer until indexuntil
of the underlying buffer. Processing will halt if the processor returnsfalse
or after processing the final byte.- from
the starting index, inclusive. Must be non-negative.
- until
the ending index, exclusive. Must be non-negative.
- returns
-1 if the processor processed all bytes or the last processed index if the processor returns
false
. Will return -1 iffrom
is greater than or equal tountil
orlength
of the underlying buffer. Will return -1 ifuntil
is greater than or equal tolength
of the underlying buffer.
- Definition Classes
- ProxyByteReader → ByteReader
- Note
this does not advance the byte cursor.
- def readAll(): Buf
Like
read
, but extracts the remainder of bytes from cursor to the length.Like
read
, but extracts the remainder of bytes from cursor to the length. Note, this advances the cursor to the end of the buf.- Definition Classes
- ProxyByteReader → ByteReader
- def readByte(): Byte
Extract 8 bits and interpret as a signed integer, advancing the byte cursor by 1.
Extract 8 bits and interpret as a signed integer, advancing the byte cursor by 1.
- Definition Classes
- ProxyByteReader → ByteReader
- def readBytes(n: Int): Buf
Returns a new buffer representing a slice of this buffer, delimited by the indices
[cursor, remaining)
.Returns a new buffer representing a slice of this buffer, delimited by the indices
[cursor, remaining)
. Out of bounds indices are truncated. Negative indices are not accepted.- Definition Classes
- ProxyByteReader → ByteReader
- def readDoubleBE(): Double
Extract 64 bits and interpret as a big endian floating point, advancing the byte cursor by 4.
Extract 64 bits and interpret as a big endian floating point, advancing the byte cursor by 4.
- Definition Classes
- ProxyByteReader → ByteReader
- def readDoubleLE(): Double
Extract 64 bits and interpret as a little endian floating point, advancing the byte cursor by 4.
Extract 64 bits and interpret as a little endian floating point, advancing the byte cursor by 4.
- Definition Classes
- ProxyByteReader → ByteReader
- def readFloatBE(): Float
Extract 32 bits and interpret as a big endian floating point, advancing the byte cursor by 4.
Extract 32 bits and interpret as a big endian floating point, advancing the byte cursor by 4.
- Definition Classes
- ProxyByteReader → ByteReader
- def readFloatLE(): Float
Extract 32 bits and interpret as a little endian floating point, advancing the byte cursor by 4.
Extract 32 bits and interpret as a little endian floating point, advancing the byte cursor by 4.
- Definition Classes
- ProxyByteReader → ByteReader
- def readIntBE(): Int
Extract 32 bits and interpret as a big endian integer, advancing the byte cursor by 4.
Extract 32 bits and interpret as a big endian integer, advancing the byte cursor by 4.
- Definition Classes
- ProxyByteReader → ByteReader
- def readIntLE(): Int
Extract 32 bits and interpret as a little endian int, advancing the byte cursor by 4.
Extract 32 bits and interpret as a little endian int, advancing the byte cursor by 4.
- Definition Classes
- ProxyByteReader → ByteReader
- def readLongBE(): Long
Extract 64 bits and interpret as a big endian integer, advancing the byte cursor by 8.
Extract 64 bits and interpret as a big endian integer, advancing the byte cursor by 8.
- Definition Classes
- ProxyByteReader → ByteReader
- def readLongLE(): Long
Extract 64 bits and interpret as a little endian integer, advancing the byte cursor by 8.
Extract 64 bits and interpret as a little endian integer, advancing the byte cursor by 8.
- Definition Classes
- ProxyByteReader → ByteReader
- def readMediumBE(): Int
Extract 24 bits and interpret as a big endian integer, advancing the byte cursor by 3.
Extract 24 bits and interpret as a big endian integer, advancing the byte cursor by 3.
- Definition Classes
- ProxyByteReader → ByteReader
- def readMediumLE(): Int
Extract 24 bits and interpret as a little endian integer, advancing the byte cursor by 3.
Extract 24 bits and interpret as a little endian integer, advancing the byte cursor by 3.
- Definition Classes
- ProxyByteReader → ByteReader
- def readShortBE(): Short
Extract 16 bits and interpret as a big endian integer, advancing the byte cursor by 2.
Extract 16 bits and interpret as a big endian integer, advancing the byte cursor by 2.
- Definition Classes
- ProxyByteReader → ByteReader
- def readShortLE(): Short
Extract 16 bits and interpret as a little endian integer, advancing the byte cursor by 2.
Extract 16 bits and interpret as a little endian integer, advancing the byte cursor by 2.
- Definition Classes
- ProxyByteReader → ByteReader
- def readString(bytes: Int, charset: Charset): String
Extract exactly the specified number of bytes into a
String
using the specifiedCharset
, advancing the byte cursor bybytes
.Extract exactly the specified number of bytes into a
String
using the specifiedCharset
, advancing the byte cursor bybytes
.- Definition Classes
- ProxyByteReader → ByteReader
- Exceptions thrown
ByteReader.UnderflowException
if there are <bytes
bytes available
- def readUnsignedByte(): Short
Extract 8 bits and interpret as an unsigned integer, advancing the byte cursor by 1.
Extract 8 bits and interpret as an unsigned integer, advancing the byte cursor by 1.
- Definition Classes
- ProxyByteReader → ByteReader
- def readUnsignedIntBE(): Long
Extract 32 bits and interpret as a big endian unsigned integer, advancing the byte cursor by 4.
Extract 32 bits and interpret as a big endian unsigned integer, advancing the byte cursor by 4.
- Definition Classes
- ProxyByteReader → ByteReader
- def readUnsignedIntLE(): Long
Extract 32 bits and interpret as a little endian unsigned integer, advancing the byte cursor by 4.
Extract 32 bits and interpret as a little endian unsigned integer, advancing the byte cursor by 4.
- Definition Classes
- ProxyByteReader → ByteReader
- def readUnsignedLongBE(): BigInt
Extract 64 bits and interpret as a big endian unsigned integer, advancing the byte cursor by 8.
Extract 64 bits and interpret as a big endian unsigned integer, advancing the byte cursor by 8.
- Definition Classes
- ProxyByteReader → ByteReader
- def readUnsignedLongLE(): BigInt
Extract 64 bits and interpret as a little endian unsigned integer, advancing the byte cursor by 8.
Extract 64 bits and interpret as a little endian unsigned integer, advancing the byte cursor by 8.
- Definition Classes
- ProxyByteReader → ByteReader
- def readUnsignedMediumBE(): Int
Extract 24 bits and interpret as a big endian unsigned integer, advancing the byte cursor by 3.
Extract 24 bits and interpret as a big endian unsigned integer, advancing the byte cursor by 3.
- Definition Classes
- ProxyByteReader → ByteReader
- def readUnsignedMediumLE(): Int
Extract 24 bits and interpret as a little endian unsigned integer, advancing the byte cursor by 3.
Extract 24 bits and interpret as a little endian unsigned integer, advancing the byte cursor by 3.
- Definition Classes
- ProxyByteReader → ByteReader
- def readUnsignedShortBE(): Int
Extract 16 bits and interpret as a big endian unsigned integer, advancing the byte cursor by 2.
Extract 16 bits and interpret as a big endian unsigned integer, advancing the byte cursor by 2.
- Definition Classes
- ProxyByteReader → ByteReader
- def readUnsignedShortLE(): Int
Extract 16 bits and interpret as a little endian unsigned integer, advancing the byte cursor by 2.
Extract 16 bits and interpret as a little endian unsigned integer, advancing the byte cursor by 2.
- Definition Classes
- ProxyByteReader → ByteReader
- def remaining: Int
The remainder of bytes that the reader is capable of reading.
The remainder of bytes that the reader is capable of reading.
- Definition Classes
- ProxyByteReader → ByteReader
- def remainingUntil(byte: Byte): Int
The remainder of bytes until the first occurrence of
byte
(exclusive).The remainder of bytes until the first occurrence of
byte
(exclusive). Returns-1
whenbyte
is not found on the underlying resource.- Definition Classes
- ProxyByteReader → ByteReader
- Note
All util and finagle Buf implementations will not copy onto the heap, but for other implementations, it may trigger a copy.
- def skip(n: Int): Unit
Skip over the next
n
bytes.Skip over the next
n
bytes.- Definition Classes
- ProxyByteReader → ByteReader
- Exceptions thrown
ByteReader.UnderflowException
if there are <n
bytes available
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()