Package

unicorn

util

Permalink

package util

Utility functions.

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

Type Members

  1. case class ByteArray(bytes: Array[Byte]) extends Ordered[ByteArray] with Product with Serializable

    Permalink

    Pimped byte array.

  2. trait Logging extends AnyRef

    Permalink

Value Members

  1. object Config

    Permalink

  2. object Using

    Permalink

  3. implicit def boxByteArray(x: Array[Byte]): ByteArray

    Permalink
  4. implicit def byteBuffer2ArrayByte(buffer: ByteBuffer): Array[Byte]

    Permalink

    Helper function convert ByteBuffer to Array[Byte].

  5. implicit def byteBuffer2ByteArray(buffer: ByteBuffer): ByteArray

    Permalink

    Helper function convert ByteBuffer to ByteArray.

  6. def bytes2Hex(bytes: Array[Byte]): String

    Permalink

    Byte array to hexadecimal string.

  7. implicit def bytesSeq2ByteArray(x: Seq[Array[Byte]]): Seq[ByteArray]

    Permalink
  8. def compareByteArray(x: Array[Byte], y: Array[Byte]): Int

    Permalink

    Byte array ordering

  9. def hex2Bytes(s: String): Array[Byte]

    Permalink

    Hexadecimal string to byte array.

  10. val iso8601DateFormatter: DateTimeFormatter

    Permalink
  11. val iso8601DateTimeFormatter: DateTimeFormatter

    Permalink
  12. def leftPad(str: String, size: Int, padChar: Char = ' '): String

    Permalink

    Left pad a String with a specified character.

    Left pad a String with a specified character.

    str

    the String to pad out, may be null

    size

    the size to pad to

    padChar

    the character to pad with

    returns

    left padded String or original String if no padding is necessary, null if null String input

  13. def md5(bytes: Array[Byte]): Array[Byte]

    Permalink

    MD5 hash function

  14. val md5Encoder: MessageDigest

    Permalink
  15. def rightPad(str: String, size: Int, padChar: Char = ' '): String

    Permalink

    Right pad a String with a specified character.

    Right pad a String with a specified character.

    str

    the String to pad out, may be null

    size

    the size to pad to

    padChar

    the character to pad with

    returns

    left padded String or original String if no padding is necessary, null if null String input

  16. implicit def string2ByteArray(x: String): ByteArray

    Permalink
  17. implicit def string2Bytes(x: String): Array[Byte]

    Permalink
  18. implicit def stringSeq2ByteArray(x: Seq[String]): Seq[ByteArray]

    Permalink
  19. def time[A](f: ⇒ A): A

    Permalink

    Measure running time of a function/block.

  20. implicit def unboxByteArray(x: ByteArray): Array[Byte]

    Permalink
  21. val utf8: Charset

    Permalink

Inherited from AnyRef

Inherited from Any

Ungrouped