Object/Trait

com.twitter.io

Buf

Related Docs: trait Buf | package io

Permalink

object Buf

Buf wrapper-types (like Buf.ByteArray and Buf.ByteBuffer) provide Shared and Owned APIs, each of which with construction & extraction utilities.

The Owned APIs may provide direct access to a Buf's underlying implementation; and so mutating the data structure invalidates a Buf's immutability constraint. Users must take care to handle this data immutably.

The Shared variants, on the other hand, ensure that the Buf shares no state with the caller (at the cost of additional allocation).

Note: There is a Java-friendly API for this object: com.twitter.io.Bufs.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Buf
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Type Members

  1. class ByteArray extends Buf

    Permalink

    A buffer representing an array of bytes.

  2. class ByteBuffer extends Buf

    Permalink

    A buffer representing the remaining bytes in the given ByteBuffer.

    A buffer representing the remaining bytes in the given ByteBuffer. The given buffer will not be affected.

    Modifications to the ByteBuffer's content will be visible to the resulting Buf. The ByteBuffer should be immutable in practice.

Value Members

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

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

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

    Permalink
    Definition Classes
    AnyRef → Any
  4. object ByteArray

    Permalink
  5. object ByteBuffer

    Permalink
  6. val Empty: Buf

    Permalink

    An empty buffer.

  7. object Iso8859_1 extends StringCoder

    Permalink

    Create and deconstruct buffers encoded by the ISO Latin Alphabet No.

    Create and deconstruct buffers encoded by the ISO Latin Alphabet No. 1 charset.

    Note

    Malformed and unmappable input is silently replaced see java.nio.charset.CodingErrorAction.REPLACE

  8. object U32BE

    Permalink

    Create and deconstruct unsigned 32-bit big endian encoded buffers.

    Create and deconstruct unsigned 32-bit big endian encoded buffers.

    Deconstructing will return the value as well as the remaining buffer.

  9. object U32LE

    Permalink

    Create and deconstruct unsigned 32-bit little endian encoded buffers.

    Create and deconstruct unsigned 32-bit little endian encoded buffers.

    Deconstructing will return the value as well as the remaining buffer.

  10. object U64BE

    Permalink

    Create and deconstruct unsigned 64-bit big endian encoded buffers.

    Create and deconstruct unsigned 64-bit big endian encoded buffers.

    Deconstructing will return the value as well as the remaining buffer.

  11. object U64LE

    Permalink

    Create and deconstruct unsigned 64-bit little endian encoded buffers.

    Create and deconstruct unsigned 64-bit little endian encoded buffers.

    Deconstructing will return the value as well as the remaining buffer.

  12. object UsAscii extends StringCoder

    Permalink

    Create and deconstruct buffers encoded by the 7-bit ASCII, also known as ISO646-US or the Basic Latin block of the Unicode character set.

    Create and deconstruct buffers encoded by the 7-bit ASCII, also known as ISO646-US or the Basic Latin block of the Unicode character set.

    Note

    Malformed and unmappable input is silently replaced see java.nio.charset.CodingErrorAction.REPLACE

  13. object Utf16 extends StringCoder

    Permalink

    Create and deconstruct 16-bit UTF buffers.

    Create and deconstruct 16-bit UTF buffers.

    Note

    Malformed and unmappable input is silently replaced see java.nio.charset.CodingErrorAction.REPLACE

  14. object Utf16BE extends StringCoder

    Permalink

    Create and deconstruct buffers encoded by the 16-bit UTF charset with big-endian byte order.

    Create and deconstruct buffers encoded by the 16-bit UTF charset with big-endian byte order.

    Note

    Malformed and unmappable input is silently replaced see java.nio.charset.CodingErrorAction.REPLACE

  15. object Utf16LE extends StringCoder

    Permalink

    Create and deconstruct buffers encoded by the 16-bit UTF charset with little-endian byte order.

    Create and deconstruct buffers encoded by the 16-bit UTF charset with little-endian byte order.

    Note

    Malformed and unmappable input is silently replaced see java.nio.charset.CodingErrorAction.REPLACE

  16. object Utf8 extends StringCoder

    Permalink

    Create and deconstruct Utf-8 encoded buffers.

    Create and deconstruct Utf-8 encoded buffers.

    Note

    Malformed and unmappable input is silently replaced see java.nio.charset.CodingErrorAction.REPLACE

  17. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  18. def clone(): AnyRef

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

    Permalink
    Definition Classes
    AnyRef
  20. def equals(x: Buf, y: Buf): Boolean

    Permalink

    Byte equality between two buffers.

    Byte equality between two buffers. May copy.

    Relies on Buf.ByteArray.equals.

  21. def equals(arg0: Any): Boolean

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  24. def hash(buf: Buf): Int

    Permalink

    The 32-bit FNV-1 of Buf

  25. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  26. final def isInstanceOf[T0]: Boolean

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

    Permalink
    Definition Classes
    AnyRef
  28. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  29. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  30. def slowHexString(buf: Buf): String

    Permalink

    Return a string representing the buffer contents in hexadecimal.

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

    Permalink
    Definition Classes
    AnyRef
  32. def toString(): String

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

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Deprecated Value Members

  1. def toByteBuffer(buf: Buf): java.nio.ByteBuffer

    Permalink

    Convert the Buf to a java.nio.ByteBuffer.

    Convert the Buf to a java.nio.ByteBuffer.

    Annotations
    @deprecated
    Deprecated

    (Since version 6.23.0) Use Buf.ByteBuffer.Owned.extract.

Inherited from AnyRef

Inherited from Any

Ungrouped