public class Functions extends Object
| Constructor | Description |
|---|---|
Functions() |
| Modifier and Type | Method | Description |
|---|---|---|
static String |
getCallerLocation() |
|
static String |
getCurrentLocation() |
|
static String |
getRandomNumericString(int len) |
Get random numeric string value of given length.
|
static String |
getStackTrace() |
|
static long |
getUniqueLong() |
Get a unique long value.
|
static long |
getVBNextSequenceID() |
Get a unique long value.
|
static int |
readByte(InputStream is,
byte[] data,
int offset,
int length) |
Read the specific amount of bytes from the given
InputStream to the byte array provided. |
static int |
readLine(InputStream is,
byte[] data,
int offset) |
Read one line of String from the given
InputStream to the byte array provided. |
public static final Random random
public static String getCallerLocation()
public static String getCurrentLocation()
public static String getStackTrace()
public static long getVBNextSequenceID()
public static long getUniqueLong()
public static int readByte(InputStream is, byte[] data, int offset, int length) throws IOException
InputStream to the byte array provided.
This method is recommended to use when we prefer an exception also at the time remote side closes the socket.is - bytes will be read from this instance of InputStreamdata - bytes will be saved into this byte array.offset - starting index of the byte array where data should be saved.length - total length to be read from the stream.IOException - when reach the end of file of the given stream.public static int readLine(InputStream is, byte[] data, int offset) throws IOException
InputStream to the byte array provided.
This method is recommended to use when we prefer an exception also at the time remote side closes the socket.is - bytes will be read from this instance of InputStreamdata - bytes will be saved into this byte array.offset - starting index of the byte array where data should be saved.IOException - when reach the end of file of the given stream.public static String getRandomNumericString(int len)
len - Defines the length of string that should be generated.Copyright © 2025. All rights reserved.