Package com.thingworx.common.utils
Class StreamUtilities
- java.lang.Object
-
- com.thingworx.common.utils.StreamUtilities
-
@ThingworxExtensionApiClass(since={6,6}, canInstantiate=true) public final class StreamUtilities extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description StreamUtilities()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method 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)
-
-
-
Method Detail
-
byteArrayToStream
@ThingworxExtensionApiMethod(since={6,6}) public static java.io.ByteArrayInputStream byteArrayToStream(byte[] data)
-
integerToBytes
@ThingworxExtensionApiMethod(since={6,6}) public static byte[] integerToBytes(int value)
-
longToBytes
@ThingworxExtensionApiMethod(since={6,6}) public static byte[] longToBytes(long value)
-
doubleToBytes
@ThingworxExtensionApiMethod(since={6,6}) public static byte[] doubleToBytes(double value)
-
booleanToBytes
@ThingworxExtensionApiMethod(since={6,6}) public static byte[] booleanToBytes(boolean value)
-
stringToBytes
@ThingworxExtensionApiMethod(since={6,6}) public static byte[] stringToBytes(java.lang.String value)
-
readStreamToByteArray
@ThingworxExtensionApiMethod(since={6,6}) public static byte[] readStreamToByteArray(java.io.InputStream stream) throws java.lang.Exception
- Throws:
java.lang.Exception
- If an error occurs
-
readStreamToString
@ThingworxExtensionApiMethod(since={6,6}) public static java.lang.String readStreamToString(java.io.InputStream stream) throws java.lang.Exception
- Throws:
java.lang.Exception
- If an error occurs
-
-