Packages

trait Writable extends Any

A Writable is a source of bytes that can be written to an OutputStream.

Essentially a push-based version of java.io.InputStream, that allows an implementation to guarantee that cleanup logic runs after the bytes are written.

Writable is also much easier to implement than java.io.InputStream: any code that previously wrote output to an ByteArrayOutputStream or StringBuilder can trivially satisfy the Writable interface. That makes Writable very convenient to use for allowing zero-friction zero-overhead streaming data exchange between different libraries.

Writable comes with implicit constructors from Array[Byte], String and InputStream, and is itself a tiny interface with minimal functionality. Libraries using Writable are expected to extend it to provide additional methods or additional implicit constructors that make sense in their context.

Linear Supertypes
Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Writable
  2. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def getClass(): Class[_]
    Definition Classes
    Any
  2. abstract def writeBytesTo(out: OutputStream): Unit

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    Any
  2. final def ##(): Int
    Definition Classes
    Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def contentLength: Option[Long]
  6. def equals(arg0: Any): Boolean
    Definition Classes
    Any
  7. def hashCode(): Int
    Definition Classes
    Any
  8. def httpContentType: Option[String]
  9. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  10. def toString(): String
    Definition Classes
    Any

Inherited from Any

Ungrouped