public class SerializableStream extends Object implements Serializable
| Modifier and Type | Field and Description |
|---|---|
static int |
BUFFER_SIZE
Default buffer-size used for writing.
|
static byte[] |
EMPTY
An empty byte-array.
|
static String |
VARIABLE_KEY_HASH_ALGORITHM
Name of the variable used to store the hash algorithm.
|
static String |
VARIABLE_KEY_HASH_VALUE
Name of the variable used to store the hash.
|
| Constructor and Description |
|---|
SerializableStream(int token,
ContentStream content,
int bufferSize)
ContentStream constructor.
|
SerializableStream(int token,
ContentStream content,
int bufferSize,
SerializableStreamContentHandler.ContentHandlers contentHandler)
ContentStream constructor.
|
SerializableStream(int token,
InputStream input,
String filename,
int element,
int bufferSize,
boolean doStreaming)
Instantiates a new serializable stream.
|
SerializableStream(int token,
InputStream input,
String filename,
int element,
int bufferSize,
boolean doStreaming,
SerializableStreamContentHandler.ContentHandlers contentHandler)
Instantiates a new serializable stream.
|
| Modifier and Type | Method and Description |
|---|---|
long |
getActualCount()
Gets the actual count.
|
int |
getPosition() |
Map<String,String> |
getVariables()
Returns the variables belonging to the content element written by this stream.
|
boolean |
isClearContent() |
long |
persist()
Persists this SerializableStream if required.
|
void |
validate()
Validates the stream.
|
public static final byte[] EMPTY
public static final int BUFFER_SIZE
public static final String VARIABLE_KEY_HASH_ALGORITHM
public static final String VARIABLE_KEY_HASH_VALUE
public SerializableStream(int token,
InputStream input,
String filename,
int element,
int bufferSize,
boolean doStreaming)
token - the tokeninput - the inputfilename - the filenameelement - the elementbufferSize - size of buffer chunkdoStreaming - True if streaming option of content data is activated.public SerializableStream(int token,
InputStream input,
String filename,
int element,
int bufferSize,
boolean doStreaming,
SerializableStreamContentHandler.ContentHandlers contentHandler)
token - the tokeninput - the inputfilename - the filenameelement - the elementbufferSize - size of buffer chunkdoStreaming - True if streaming option of content data is activated.contentHandler - handles the writing of the content when serializing this streampublic SerializableStream(int token,
ContentStream content,
int bufferSize)
token - user tokencontent - content stream to wrapbufferSize - size of buffer chunkpublic SerializableStream(int token,
ContentStream content,
int bufferSize,
SerializableStreamContentHandler.ContentHandlers contentHandler)
token - user tokencontent - content stream to wrapbufferSize - size of buffer chunkcontentHandler - handles the writing of the content when serializing this streampublic long getActualCount()
public void validate()
throws StreamVerificationException
StreamVerificationException - if the expected hash or length was not matched.public long persist()
throws IOException
IOException - IO Exception when persistingpublic Map<String,String> getVariables()
public boolean isClearContent()
ContentStream has no InputStream.public int getPosition()
Copyright © 2020 Hyland Software Germany GmbH. All rights reserved.