Package

com.twitter

io

Permalink

package io

Visibility
  1. Public
  2. All

Type Members

  1. abstract class AbstractByteWriter extends ByteWriter

    Permalink

    An abstract implementation that implements the floating point methods in terms of integer methods.

  2. abstract class Buf extends AnyRef

    Permalink

    Buf represents a fixed, immutable byte buffer with efficient positional access.

    Buf represents a fixed, immutable byte buffer with efficient positional access. Buffers may be sliced and concatenated, and thus be used to implement bytestreams.

    See also

    com.twitter.io.Buf.Empty for an empty Buf.

    com.twitter.io.Buf.apply for creating a Buf from other Bufs

    com.twitter.io.Buf.ByteBuffer for an nio.ByteBuffer backed implementation.

    com.twitter.io.Buf.ByteArray for an Array[Byte] backed implementation.

  3. trait BufByteWriter extends ByteWriter

    Permalink

    A ByteWriter that results in an owned Buf

  4. class BufInputStream extends InputStream

    Permalink
  5. final class Bufs extends AnyRef

    Permalink
  6. trait ByteReader extends AutoCloseable

    Permalink

    A ByteReader provides a stateful API to extract bytes from an underlying buffer, which in most cases is a Buf.

    A ByteReader provides a stateful API to extract bytes from an underlying buffer, which in most cases is a Buf. This conveniently allows codec implementations to decode frames, specifically when they need to decode and interpret the bytes as a numeric value.

    Note

    Unless otherwise stated, ByteReader implementations are not thread safe.

  7. trait ByteWriter extends AnyRef

    Permalink

    ByteWriters allow efficient encoding to a buffer.

    ByteWriters allow efficient encoding to a buffer. Concatenating Bufs together is a common pattern for codecs (especially on the encode path), but using the concat method on Buf results in a suboptimal representation. In many cases, a ByteWriter not only allows for a more optimal representation (i.e., sequential accessible out regions), but also allows for writes to avoid allocations. What this means in practice is that builders are stateful. Assume that the builder implementations are ""not"" threadsafe unless otherwise noted.

  8. class InputStreamReader extends Reader with Closable with CloseAwaitably

    Permalink

    Provides the Reader API for an InputStream.

    Provides the Reader API for an InputStream.

    The given InputStream will be closed when Reader.read reaches the EOF or a call to discard() or close().

  9. trait Reader extends AnyRef

    Permalink

    A Reader represents a stream of bytes, read in discrete chunks.

    A Reader represents a stream of bytes, read in discrete chunks. Readers permit at most one outstanding read.

  10. final class Readers extends AnyRef

    Permalink
  11. trait Writer extends AnyRef

    Permalink

    A Writer represents a sink for a stream of bytes, providing a convenient interface for the producer of such streams.

  12. final class Writers extends AnyRef

    Permalink

Value Members

  1. object Buf

    Permalink

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

    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 are Java-friendly APIs for this object at com.twitter.io.Bufs.

  2. object BufByteWriter

    Permalink
  3. object BufReader

    Permalink
  4. object ByteReader

    Permalink
  5. object ByteWriter

    Permalink
  6. object Charsets

    Permalink

    A set of java.nio.charset.Charset utilities.

  7. object Files

    Permalink

    Utilities for working with java.io.Files

  8. object InputStreamReader

    Permalink
  9. object Reader

    Permalink
  10. object StreamIO

    Permalink
  11. object TempDirectory

    Permalink
  12. object TempFile

    Permalink
  13. object Writer

    Permalink

    See also

    Writers for Java friendly APIs.

  14. package exp

    Permalink

Ungrouped