public abstract class PickleUtils
extends java.lang.Object
| Constructor and Description |
|---|
PickleUtils() |
| Modifier and Type | Method and Description |
|---|---|
static double |
bytes_to_double(byte[] bytes,
int offset)
Convert a big endian 8-byte to a double.
|
static float |
bytes_to_float(byte[] bytes,
int offset)
Convert a big endian 4-byte to a float.
|
static int |
bytes_to_integer(byte[] bytes)
Convert a couple of bytes into the corresponding integer number.
|
static int |
bytes_to_integer(byte[] bytes,
int offset,
int size) |
static long |
bytes_to_long(byte[] bytes,
int offset)
Convert 8 little endian bytes into a long
|
static long |
bytes_to_uint(byte[] bytes,
int offset)
Convert 4 little endian bytes into an unsigned int (as a long)
|
static java.lang.String |
decode_escaped(java.lang.String str)
Decode a string with possible escaped char sequences in it (\x??).
|
static java.lang.Number |
decode_long(byte[] data)
read an arbitrary 'long' number.
|
static java.lang.String |
decode_unicode_escaped(java.lang.String str)
Decode a string with possible escaped unicode in it (€)
|
static byte[] |
double_to_bytes(double d)
Convert a double to its 8-byte representation (big endian).
|
static byte[] |
encode_long(java.math.BigInteger big)
encode an arbitrary long number into a byte array (little endian).
|
static byte[] |
integer_to_bytes(int i)
Convert a signed integer to its 4-byte representation.
|
static java.lang.Number |
optimizeBigint(java.math.BigInteger bigint)
Optimize a biginteger, if possible return a long primitive datatype.
|
static java.lang.String |
rawStringFromBytes(byte[] data)
Construct a String from the given bytes where these are directly
converted to the corresponding chars, without using a given character
encoding
|
static short |
readbyte(java.io.InputStream input)
read a single unsigned byte
|
static void |
readbytes_into(java.io.InputStream input,
byte[] buffer,
int offset,
int length)
read a number of signed bytes into the specified location in an existing byte array
|
static byte[] |
readbytes(java.io.InputStream input,
int n)
read a number of signed bytes
|
static byte[] |
readbytes(java.io.InputStream input,
long n)
read a number of signed bytes
|
static java.lang.String |
readline(java.io.InputStream input)
read a line of text, excluding the terminating LF char
|
static java.lang.String |
readline(java.io.InputStream input,
boolean includeLF)
read a line of text, possibly including the terminating LF char
|
static byte[] |
str2bytes(java.lang.String str)
Convert a string to a byte array, no encoding is used.
|
public static java.lang.String readline(java.io.InputStream input)
throws java.io.IOException
java.io.IOExceptionpublic static java.lang.String readline(java.io.InputStream input,
boolean includeLF)
throws java.io.IOException
java.io.IOExceptionpublic static short readbyte(java.io.InputStream input)
throws java.io.IOException
java.io.IOExceptionpublic static byte[] readbytes(java.io.InputStream input,
int n)
throws java.io.IOException
java.io.IOExceptionpublic static byte[] readbytes(java.io.InputStream input,
long n)
throws java.io.IOException
java.io.IOExceptionpublic static void readbytes_into(java.io.InputStream input,
byte[] buffer,
int offset,
int length)
throws java.io.IOException
java.io.IOExceptionpublic static int bytes_to_integer(byte[] bytes)
public static int bytes_to_integer(byte[] bytes,
int offset,
int size)
public static long bytes_to_long(byte[] bytes,
int offset)
public static long bytes_to_uint(byte[] bytes,
int offset)
public static byte[] integer_to_bytes(int i)
public static byte[] double_to_bytes(double d)
public static double bytes_to_double(byte[] bytes,
int offset)
public static float bytes_to_float(byte[] bytes,
int offset)
public static java.lang.Number decode_long(byte[] data)
public static byte[] encode_long(java.math.BigInteger big)
public static java.lang.Number optimizeBigint(java.math.BigInteger bigint)
public static java.lang.String rawStringFromBytes(byte[] data)
public static byte[] str2bytes(java.lang.String str)
throws java.io.IOException
java.io.IOExceptionpublic static java.lang.String decode_escaped(java.lang.String str)
public static java.lang.String decode_unicode_escaped(java.lang.String str)
Copyright © 2019. All Rights Reserved.