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 Object
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic byte[]booleanToBytes(boolean value) static ByteArrayInputStreambyteArrayToStream(byte[] data) static byte[]doubleToBytes(double value) static byte[]integerToBytes(int value) static byte[]longToBytes(long value) static byte[]readStreamToByteArray(InputStream stream) static StringreadStreamToString(InputStream stream) static byte[]stringToBytes(String value)
-
Constructor Details
-
StreamUtilities
public StreamUtilities()Initializes this instace with default values.
-
-
Method Details
-
byteArrayToStream
@ThingworxExtensionApiMethod(since={6,6}) public static ByteArrayInputStream byteArrayToStream(byte[] data) -
integerToBytes
-
longToBytes
-
doubleToBytes
-
booleanToBytes
-
stringToBytes
-
readStreamToByteArray
@ThingworxExtensionApiMethod(since={6,6}) public static byte[] readStreamToByteArray(InputStream stream) throws Exception - Throws:
Exception
-
readStreamToString
@ThingworxExtensionApiMethod(since={6,6}) public static String readStreamToString(InputStream stream) throws Exception - Throws:
Exception
-