public class StreamParameter extends Object implements ParameterHolder
| Constructor and Description |
|---|
StreamParameter(InputStream is,
long readLength)
Create a new StreamParameter.
|
| Modifier and Type | Method and Description |
|---|---|
long |
length()
Returns the length of the parameter - this is the total amount of bytes that will be sent.
|
int |
writeTo(OutputStream os,
int offset,
int maxWriteSize)
Writes the parameter to an outputstream.
|
public StreamParameter(InputStream is, long readLength) throws IOException
is - the input stream to create the parameter fromreadLength - the length to readIOException - if we cannot read the streampublic int writeTo(OutputStream os, int offset, int maxWriteSize) throws IOException
writeTo in interface ParameterHolderos - the outputstream to write tooffset - where to start writingmaxWriteSize - max number of bytes to writeIOException - if we cannot write to the streampublic final long length()
length in interface ParameterHolderCopyright © 2016. All rights reserved.