Package sop
Class Ready
- java.lang.Object
-
- sop.Ready
-
- Direct Known Subclasses:
Signatures
public abstract class Ready extends Object
-
-
Constructor Summary
Constructors Constructor Description Ready()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description byte[]
getBytes()
Return the data as a byte array by writing it to aByteArrayOutputStream
first and then returning the array.InputStream
getInputStream()
Return an input stream containing the data.abstract void
writeTo(OutputStream outputStream)
Write the data to the provided output stream.
-
-
-
Constructor Detail
-
Ready
public Ready()
-
-
Method Detail
-
writeTo
public abstract void writeTo(OutputStream outputStream) throws IOException
Write the data to the provided output stream.- Parameters:
outputStream
- output stream- Throws:
IOException
- in case of an IO error
-
getBytes
public byte[] getBytes() throws IOException
Return the data as a byte array by writing it to aByteArrayOutputStream
first and then returning the array.- Returns:
- data as byte array
- Throws:
IOException
- in case of an IO error
-
getInputStream
public InputStream getInputStream() throws IOException
Return an input stream containing the data.- Returns:
- input stream
- Throws:
IOException
- in case of an IO error
-
-