biz.neustar.wpm.api
Interface Bytes


public interface Bytes

A simple representation of a byte array of data


Method Summary
 java.lang.String base64()
          Returns the base64 encoding of these bytes.
 long getLength()
          get the length of the string.
 java.lang.String md5()
          Returns the MD5 of these bytes in hex string form.
 java.lang.Object md5(boolean binary)
          Returns the MD5 of these bytes in hex string form or binary form.
 byte[] toByteArray()
           
 java.lang.String toHex()
          Returns data hex string of the binary byte values.
 java.lang.String toString()
          Returns data as a UTF8 string.
 

Method Detail

md5

java.lang.String md5()
Returns the MD5 of these bytes in hex string form.

Returns:
the hex string MD5
See Also:
Utils.md5(Object)

md5

java.lang.Object md5(boolean binary)
Returns the MD5 of these bytes in hex string form or binary form.

Parameters:
binary - whether to return a binary or hex string MD5
Returns:
the hex string MD5 or the Bytes
See Also:
Utils.md5(Object, boolean)

base64

java.lang.String base64()
Returns the base64 encoding of these bytes.

Returns:
base64 encoded string
See Also:
Utils.base64(Object)

toString

java.lang.String toString()
Returns data as a UTF8 string.

Overrides:
toString in class java.lang.Object
Returns:
UTF8 encoded string

toHex

java.lang.String toHex()
Returns data hex string of the binary byte values.

Returns:
hex string of the binary byte values

toByteArray

byte[] toByteArray()

getLength

long getLength()
get the length of the string.

Returns:
the length of the string

Copyright © 2020 Neustar, Inc. All Rights Reserved.