Object

com.twitter.util

Base64Long

Related Doc: package util

Permalink

object Base64Long

Efficient conversion between Longs and base 64 encoded strings.

This is intended for use in e.g. cache keys.

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

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. val StandardBase64Alphabet: PartialFunction[Int, Char]

    Permalink
  5. def alphabet(chars: Iterable[Char]): PartialFunction[Int, Char]

    Permalink

    Convert an ordered sequence of 64 characters into a base 64 alphabet.

  6. final def asInstanceOf[T0]: T0

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

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

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

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. def fromBase64(chars: CharSequence): Long

    Permalink

    Decode a full CharSequence as a base-64-encoded Long, using the standard base-64 alphabet.

  12. def fromBase64(chars: CharSequence, start: Int, end: Int, alphabet: PartialFunction[Char, Int] = StandardBase64AlphabetInverted): Long

    Permalink

    Decode a sequence of characters representing a base-64-encoded Long, as produced by toBase64.

    Decode a sequence of characters representing a base-64-encoded Long, as produced by toBase64. An empty range of characters will yield 0L. Leading "zero" digits will not cause overflow.

    alphabet

    defines the mapping between characters in the string and 6-bit numbers.

    Exceptions thrown

    ArithmeticException if the resulting value overflows a Long.

    IllegalArgumentException if any characters in the specified range are not in the specified base-64 alphabet.

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

    Permalink
    Definition Classes
    AnyRef → Any
  14. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  15. def invertAlphabet(forward: (Int) ⇒ Char): PartialFunction[Char, Int]

    Permalink

    Invert a base 64 alphabet, creating a function suitable for use in fromBase64.

  16. final def isInstanceOf[T0]: Boolean

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

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

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

    Permalink
    Definition Classes
    AnyRef
  20. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  21. def toBase64(builder: StringBuilder, l: Long, alphabet: (Int) ⇒ Char = StandardBase64Alphabet): Unit

    Permalink

    Append a base-64 encoded Long to a StringBuilder.

    Append a base-64 encoded Long to a StringBuilder.

    The Base64 encoding uses the standard Base64 alphabet (with '+' and '/'). It does not pad the result. The representation is just like base 10 or base 16, where leading zero digits are omitted.

    The number is treated as unsigned, so there is never a leading negative sign, and the representations of negative numbers are larger than positive numbers.

  22. def toBase64(l: Long): String

    Permalink

    Convert this Long to a base 64 String, using the standard base 64 alphabet.

  23. def toString(): String

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

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

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

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

Inherited from AnyRef

Inherited from Any

Ungrouped