com.twitter.finagle.exp.mysql.transport

BufferReader

trait BufferReader extends Buffer

Provides convenient methods for reading data in a packet body. All data is decoded in little endian byte order in accordance with the mysql protocol. Operations are side-effecting, that is, all operations increase the offset into the underlying buffer.

Linear Supertypes
Buffer, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. BufferReader
  2. Buffer
  3. AnyRef
  4. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def offset: Int

    Current reader offset in the buffer.

  2. abstract def readByte(): Byte

  3. abstract def readDouble(): Double

  4. abstract def readFloat(): Float

  5. abstract def readInt(): Int

  6. abstract def readInt24(): Int

  7. abstract def readLong(): Long

  8. abstract def readShort(): Short

  9. abstract def readUnsignedByte(): Short

  10. abstract def readUnsignedInt(): Long

  11. abstract def readUnsignedInt24(): Int

  12. abstract def readUnsignedShort(): Int

  13. abstract def readable(width: Int): Boolean

    Denotes if the buffer is readable upto the given width based on the current offset.

  14. abstract def skip(n: Int): Unit

    Increases offset by n.

  15. abstract def take(n: Int): Array[Byte]

    Consumes n bytes in the buffer and returns them in a new Array.

    Consumes n bytes in the buffer and returns them in a new Array.

    returns

    An Array[Byte] containing bytes from offset to offset+n

  16. abstract def toString(start: Int, length: Int, charset: Charset): String

    Returns the bytes from start to start+length into a string using the given java.

    Returns the bytes from start to start+length into a string using the given java.nio.charset.Charset.

  17. abstract val underlying: ChannelBuffer

    Definition Classes
    Buffer

Concrete Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. def capacity: Int

    Definition Classes
    Buffer
  8. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  9. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  10. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  11. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  12. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  13. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  14. def headOption: Option[Byte]

    Definition Classes
    Buffer
  15. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  16. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  17. final def notify(): Unit

    Definition Classes
    AnyRef
  18. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  19. def readLengthCodedBinary(): Long

    Reads a MySQL data field.

    Reads a MySQL data field. A variable-length numeric value. Depending on the first byte, reads a different width from the buffer. For more info, refer to MySQL Client/Server protocol documentation.

    returns

    a numeric value representing the number of bytes expected to follow.

  20. def readLengthCodedBytes(): Array[Byte]

    Reads a length encoded set of bytes according to the MySQL Client/Server protocol.

    Reads a length encoded set of bytes according to the MySQL Client/Server protocol. This is indentical to a length coded string except the bytes are returned raw.

    returns

    an Array[Byte] containing the length coded set of bytes starting at offset.

  21. def readLengthCodedString(charset: Charset = Charset.defaultCharset): String

    Reads a length encoded string according to the MySQL Client/Server protocol.

    Reads a length encoded string according to the MySQL Client/Server protocol. Uses Charset.defaultCharset by default to decode strings. For more details refer to MySQL documentation.

    returns

    a MySQL length coded String starting at offset.

  22. def readNullTerminatedBytes(): Array[Byte]

    Reads a null-terminated array where null is denoted by '\0'.

    Reads a null-terminated array where null is denoted by '\0'.

    returns

    a null-terminated String starting at offset.

  23. def readNullTerminatedString(charset: Charset = Charset.defaultCharset): String

    Reads a null-terminated string where null is denoted by '\0'.

    Reads a null-terminated string where null is denoted by '\0'. Uses Charset.defaultCharset by default to decode strings.

    returns

    a null-terminated String starting at offset.

  24. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  25. def takeRest(): Array[Byte]

    Consumes the rest of the buffer and returns it in a new Array[Byte].

    Consumes the rest of the buffer and returns it in a new Array[Byte].

    returns

    Array[Byte] containing the rest of the buffer.

  26. def toString(): String

    Definition Classes
    AnyRef → Any
  27. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()
  28. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()
  29. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()

Inherited from Buffer

Inherited from AnyRef

Inherited from Any

Ungrouped