Packages

o

com.twitter.util

Base64Long

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
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. val StandardBase64Alphabet: PartialFunction[Int, Char]
  5. def alphabet(chars: Iterable[Char]): PartialFunction[Int, Char]

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

  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  8. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  9. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  10. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. def fromBase64(chars: CharSequence): Long

    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

    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[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  14. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  15. def invertAlphabet(forward: (Int) ⇒ Char): PartialFunction[Char, Int]

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

  16. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  17. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  18. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  19. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  20. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  21. def toBase64(builder: StringBuilder, l: Long, alphabet: (Int) ⇒ Char = StandardBase64Alphabet): Unit

    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

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

  23. def toString(): String
    Definition Classes
    AnyRef → Any
  24. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  25. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  26. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped