Object
OutputStream
ByteArrayOutputStream
XOutputStream
- All Implemented Interfaces:
Closeable
,Flushable
,AutoCloseable
Implements an OutputStream by extending ByteArrayOutputStream with methods which allows you to
get all written data in one of the formats available.
-
Field Summary
Fields inherited from class ByteArrayOutputStream
buf, count
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns written data in form of HEX string.asList()
Returns written data in form of List of integers.Methods inherited from class ByteArrayOutputStream
close, reset, size, toByteArray, toString, toString, toString, toString, write, write, writeBytes, writeTo
Methods inherited from class OutputStream
flush, nullOutputStream, write
-
Constructor Details
-
XOutputStream
public XOutputStream()
-
-
Method Details
-
asList
Returns written data in form of List of integers. Writing "abc" will result [97, 98, 99] and "hello" to [104, 101, 108, 108, 111] -
asHexString
Returns written data in form of HEX string. Writing "abc" will result to "61, 62, 63" and "hello" to "68, 65, 6c, 6c, 6f".Each byte always encoded with 2 symbols (padded with 0)
-