Object

spinoco.protocol.common

codec

Related Doc: package common

Permalink

object codec

Source
codec.scala
Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. codec
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. implicit final class ByteVectorCodecSyntax extends AnyVal

    Permalink
  2. implicit final class UnitCodecSyntax extends AnyVal

    Permalink

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. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. lazy val bitsWsRemoved: Codec[BitVector]

    Permalink
  6. lazy val boolAsString: Codec[Boolean]

    Permalink
  7. def bytesUntil(f: (Byte) ⇒ Boolean): Codec[ByteVector]

    Permalink

    Decodes bytes util f holds.

    Decodes bytes util f holds. Encodes as identity

  8. lazy val bytesWsRemoved: Codec[ByteVector]

    Permalink
  9. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  10. def constantString(s: String): Codec[Unit]

    Permalink
  11. def dropWhile(encodeAs: BitVector)(f: (Byte) ⇒ Boolean): Codec[Unit]

    Permalink

    drops while f holds.

    drops while f holds. Then when encoding uses encodeAs *

  12. def duration[N](units: TimeUnit, mkN: (Double) ⇒ N)(codec: Codec[N])(implicit N: Numeric[N]): Codec[FiniteDuration]

    Permalink

    creates duration from specified units *

  13. def durationIntMs(codec: Codec[Int]): Codec[FiniteDuration]

    Permalink

    encodes duration in Ms for Int *

  14. def enclosedBy[A](open: Char, close: Char)(codec: Codec[A]): Codec[A]

    Permalink

    When decoding takes up bytes if open and close character are found.

    When decoding takes up bytes if open and close character are found. if there are multiple open characters found, this decodes until matching close characters are found. When encoding wraps the result of codec to open and close characters

  15. val epochTimestamp: Codec[Date]

    Permalink

    encodes as ms since epoch *

  16. final def eq(arg0: AnyRef): Boolean

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

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  19. lazy val floatAsString: Codec[Float]

    Permalink

    Float encoded as string value

  20. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  21. def guard[A](c: Codec[A])(f: (A) ⇒ Option[Err]): Codec[A]

    Permalink

    Applies predicate f to check whether A was decoded successfully, or may be encoded.

    Applies predicate f to check whether A was decoded successfully, or may be encoded. If f yields to String, then this signals failure

  22. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  23. lazy val intAsString: Codec[Int]

    Permalink

    Int encoded as string value

  24. def intBounded(codec: Codec[Int])(min: Int, max: Int): Codec[Int]

    Permalink

    int codec, that allows min/max bounds inclusive *

  25. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  26. lazy val longAsString: Codec[Long]

    Permalink

    Int encoded as string value

  27. def lookahead2(codec: Codec[Unit]): Codec[Boolean]

    Permalink

    correct version of lookahead that won't encode codec when encoding *

  28. final def ne(arg0: AnyRef): Boolean

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

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

    Permalink
    Definition Classes
    AnyRef
  31. def recover2(codec: Codec[Unit]): Codec[Boolean]

    Permalink

     like Recover codec, but with fixed encode *

  32. def stringBounded(codec: Codec[String])(min: Int, max: Int): Codec[String]

    Permalink

    string codec, that allows min/max bounds on size inclusive *

  33. def stringEnumerated(discriminator: Codec[String], enumeration: Enumeration): DiscriminatorCodec[Value, String]

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

    Permalink
    Definition Classes
    AnyRef
  35. def tagged[A, T](codec: Codec[A]): Codec[@@[A, T]]

    Permalink

    tags value A with T *

  36. def takeWhile[A](codec: Codec[A])(f: (Byte) ⇒ Boolean): Codec[A]

    Permalink

    takes bytes until f holds, then decodes via codec *

  37. def takeWhile[A](discriminator: ByteVector, encodingDiscriminator: ByteVector, codec: Codec[A], maxLength: Int = Int.MaxValue): Codec[A]

    Permalink

    A codec that takes all bytes until discriminator is found.

    A codec that takes all bytes until discriminator is found. Then codec is applied to get A Remainder AFTER discriminator is returned

  38. def takeWhileChar[A](codec: Codec[A])(char: Char, chars: Char*): Codec[A]

    Permalink

    takes bytes until char or chars are encountered *

  39. def terminatedBy[A](delimiter: ByteVector, encDelimiter: ByteVector, codec: Codec[A]): Codec[A]

    Permalink

    Decodes bytes that are terminated by supplied byte, and then applies codec on bytes decoded differs from codec ~ delimiter so the delimiter is scanned first and then codec is applied.

    Decodes bytes that are terminated by supplied byte, and then applies codec on bytes decoded differs from codec ~ delimiter so the delimiter is scanned first and then codec is applied.

    The delimiter is not part of any remainder returned when decoding.

    instead using delimiter to encode, encDelimiter is used.

  40. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  41. def untilEOL[A](codec: Codec[A], encodeNewLine: BitVector = BitVector.view("\r\n".getBytes)): Codec[A]

    Permalink

    codec that decodes codec, until EOL signature is found.

    codec that decodes codec, until EOL signature is found. EOL is defined as crlf or lf only*

  42. def untilWs[A](codec: Codec[A]): Codec[A]

    Permalink

    codec that takes until any whitespace and then this applies supplied codec *

  43. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  46. final def xor[A](codec: Codec[A], or: BitVector): Codec[A]

    Permalink

    Performs Xor operation of codec with or

Inherited from AnyRef

Inherited from Any

Ungrouped