@ThingworxExtensionApiClass(since={6,6}, canInstantiate=true) public final class StreamUtilities extends java.lang.Object
Constructor and Description |
---|
StreamUtilities() |
Modifier and Type | Method and Description |
---|---|
static byte[] |
booleanToBytes(boolean value) |
static java.io.ByteArrayInputStream |
byteArrayToStream(byte[] data) |
static byte[] |
doubleToBytes(double value) |
static byte[] |
integerToBytes(int value) |
static byte[] |
longToBytes(long value) |
static byte[] |
readStreamToByteArray(java.io.InputStream stream) |
static java.lang.String |
readStreamToString(java.io.InputStream stream) |
static byte[] |
stringToBytes(java.lang.String value) |
@ThingworxExtensionApiMethod(since={6,6}) public static java.io.ByteArrayInputStream byteArrayToStream(byte[] data)
@ThingworxExtensionApiMethod(since={6,6}) public static byte[] integerToBytes(int value)
@ThingworxExtensionApiMethod(since={6,6}) public static byte[] longToBytes(long value)
@ThingworxExtensionApiMethod(since={6,6}) public static byte[] doubleToBytes(double value)
@ThingworxExtensionApiMethod(since={6,6}) public static byte[] booleanToBytes(boolean value)
@ThingworxExtensionApiMethod(since={6,6}) public static byte[] stringToBytes(java.lang.String value)
@ThingworxExtensionApiMethod(since={6,6}) public static byte[] readStreamToByteArray(java.io.InputStream stream) throws java.lang.Exception
java.lang.Exception
- If an error occurs@ThingworxExtensionApiMethod(since={6,6}) public static java.lang.String readStreamToString(java.io.InputStream stream) throws java.lang.Exception
java.lang.Exception
- If an error occurs