object Reader

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Reader
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  6. def concat[A](readers: Seq[Reader[A]]): Reader[A]

    Convenient abstraction to read from a collection of Readers as if it were a single Reader.

    Convenient abstraction to read from a collection of Readers as if it were a single Reader.

    readers

    A collection of Reader[A]

  7. def concat[A](readers: AsyncStream[Reader[A]]): Reader[A]

    Convenient abstraction to read from a stream (AsyncStream) of Readers as if it were a single Reader.

    Convenient abstraction to read from a stream (AsyncStream) of Readers as if it were a single Reader.

    readers

    An AsyncStream holds a stream of Reader[A]

  8. def empty[A]: Reader[A]
  9. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  10. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  11. def exception[A](e: Throwable): Reader[A]

    Construct a Reader from an exception e

  12. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  13. def flatten[A](readers: Reader[Reader[A]]): Reader[A]

    Convenient abstraction to read from a stream (Reader) of Readers as if it were a single Reader.

    Convenient abstraction to read from a stream (Reader) of Readers as if it were a single Reader.

    readers

    A Reader holds a stream of Reader[A]

    Note

    All operations of the new Reader will be in sync with the outermost Reader. Discarding one Reader will discard the other Reader. When one Reader's onClose resolves, the other Reader's onClose will be resolved immediately with the same value. The subsequent readers are unmanaged, the caller is responsible for discarding those when abandoned.

  14. def fromAsyncStream[A](as: AsyncStream[A]): Reader[A]

    Allow com.twitter.concurrent.AsyncStream to be consumed as a Reader

  15. def fromBuf(buf: Buf, chunkSize: Int): Reader[Buf]

    Create a new Reader from a given Buf.

    Create a new Reader from a given Buf. The output of a returned reader is chunked by at most chunkSize (bytes).

    Note

    The n (number of bytes to read) argument on the returned reader's read is ignored.

  16. def fromBuf(buf: Buf): Reader[Buf]

    Create a new Reader from a given Buf.

    Create a new Reader from a given Buf. The output of a returned reader is chunked by a least chunkSize (bytes).

  17. def fromCollection[A](list: Collection[A]): Reader[A]

    Java-Friendly version of fromSeq Create a new Reader from a given Java List

  18. def fromFile(f: File, chunkSize: Int): Reader[Buf]

    Create a new Reader from a given File.

    Create a new Reader from a given File. The output of a returned reader is chunked by at most chunkSize (bytes).

    The resources held by the returned Reader are released on reading of EOF and Reader.discard.

    See also

    Readers.fromFile for a Java API

  19. def fromFile(f: File): Reader[Buf]

    Create a new Reader from a given File.

    Create a new Reader from a given File. The output of a returned reader is chunked by at most chunkSize (bytes).

    The resources held by the returned Reader are released on reading of EOF and Reader.discard.

    See also

    Readers.fromFile for a Java API

  20. def fromFuture[A](fa: Future[A]): Reader[A]

    Construct a Reader from a Future

    Construct a Reader from a Future

    Note

    Multiple outstanding reads are not allowed on this reader

  21. def fromIterator[A](it: Iterator[A]): Reader[A]

    Create a new Reader from a given Iterator.

    Create a new Reader from a given Iterator.

    The resources held by the returned Reader are released on reading of EOF and Reader.discard.

    Note

    It is not recommended to call it.next() after creating a Reader from it. Doing so will affect the behavior of Reader.read() because it will skip the value returned from it.next.

  22. def fromSeq[A](seq: Seq[A]): Reader[A]

    Create a new Reader from a given Seq.

    Create a new Reader from a given Seq.

    The resources held by the returned Reader are released on reading of EOF and Reader.discard.

    Note

    Multiple outstanding reads are not allowed on this reader.

  23. def fromStream(s: InputStream, chunkSize: Int): Reader[Buf]

    Create a new Reader from a given InputStream.

    Create a new Reader from a given InputStream. The output of a returned reader is chunked by at most chunkSize (bytes).

    The resources held by the returned Reader are released on reading of EOF and Reader.discard.

    See also

    Readers.fromStream for a Java API

  24. def fromStream(s: InputStream): Reader[Buf]

    Create a new Reader from a given InputStream.

    Create a new Reader from a given InputStream. The output of a returned reader is chunked by at most chunkSize (bytes).

    The resources held by the returned Reader are released on reading of EOF and Reader.discard.

  25. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  26. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  27. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  28. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  29. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  30. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  31. def readAllItems[A](r: Reader[A]): Future[Seq[A]]

    Read all items from the Reader r.

    Read all items from the Reader r.

    r

    The reader to read from

    returns

    A Sequence of items.

  32. def readAllItemsInterruptible[A](r: Reader[A]): Future[Seq[A]]

    Read all items from the Reader r, interrupting the returned future will discard the reader.

    Read all items from the Reader r, interrupting the returned future will discard the reader.

    r

    The reader to read from

    returns

    A Sequence of items.

  33. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  34. def toAsyncStream[A](r: Reader[A]): AsyncStream[A]

    Transformation (or lift) from Reader into AsyncStream.

  35. def toString(): String
    Definition Classes
    AnyRef → Any
  36. def value[A](a: A): Reader[A]

    Construct a Reader from a value a

    Construct a Reader from a value a

    Note

    Multiple outstanding reads are not allowed on this reader

  37. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  38. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  39. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()

Inherited from AnyRef

Inherited from Any

Ungrouped