net.named_data.jndn.util
public class Common extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
MAX_NDN_PACKET_SIZE
The practical limit of the size of a network-layer packet.
|
| Constructor and Description |
|---|
Common() |
| Modifier and Type | Method and Description |
|---|---|
static byte[] |
base64Decode(String encoding)
Decode the input as base64 using the appropriate base64Converter_ from
establishBase64Converter(), for ANDROID or Java 7+.
|
static String |
base64Encode(byte[] input)
Encode the input as base64 using the appropriate base64Converter_ from
establishBase64Converter(), for ANDROID or Java 7+.
|
static byte[] |
digestSha256(ByteBuffer data)
Compute the sha-256 digest of data.
|
static double |
getNowMilliseconds()
Get the current time in milliseconds.
|
static String |
toHex(byte[] buffer)
Return a hex string of the contents of buffer.
|
public static final int MAX_NDN_PACKET_SIZE
public static double getNowMilliseconds()
public static byte[] digestSha256(ByteBuffer data)
data - The input byte buffer. This does not change the position.public static String toHex(byte[] buffer)
buffer - The buffer.public static String base64Encode(byte[] input)
input - The bytes to encode.UnsupportedOperationException - If can't establish a base64 converter for
this platform.public static byte[] base64Decode(String encoding) throws SecurityException
encoding - The base64 string.UnsupportedOperationException - If can't establish a base64 converter for
this platform.SecurityExceptionCopyright © 2016. All rights reserved.