T
- the type of target data modelpublic abstract class BinaryStreamFormat<T> extends Object implements FragmentableDataFormat<T>
InputStream
/ OutputStream
.
This implementation class must have a public constructor without any parameters.Constructor and Description |
---|
BinaryStreamFormat() |
Modifier and Type | Method and Description |
---|---|
ModelInput<T> |
createInput(Class<? extends T> dataType,
String path,
InputStream stream)
Creates a new
ModelInput for the specified properties. |
abstract ModelInput<T> |
createInput(Class<? extends T> dataType,
String path,
InputStream stream,
long offset,
long fragmentSize)
Creates a new
ModelInput for the specified properties. |
abstract ModelOutput<T> |
createOutput(Class<? extends T> dataType,
String path,
OutputStream stream)
Creates a new
ModelOutput for the specified properties. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getMinimumFragmentSize, getPreferredFragmentSize
getSupportedType
public ModelInput<T> createInput(Class<? extends T> dataType, String path, InputStream stream) throws IOException, InterruptedException
ModelInput
for the specified properties.dataType
- the target data typepath
- the path about the target stream (for label)stream
- the target streamIOException
- if failed to create readerInterruptedException
- if interruptedIllegalArgumentException
- if this does not support target property sequence,
or any parameter is null
public abstract ModelInput<T> createInput(Class<? extends T> dataType, String path, InputStream stream, long offset, long fragmentSize) throws IOException, InterruptedException
ModelInput
for the specified properties.dataType
- the target data typepath
- the path about the target stream (for label)stream
- the target streamoffset
- starting stream offsetfragmentSize
- suggested fragment bytes count, or -1
as infiniteIOException
- if failed to create readerInterruptedException
- if interruptedIllegalArgumentException
- if this does not support target property sequence,
or any parameter is null
public abstract ModelOutput<T> createOutput(Class<? extends T> dataType, String path, OutputStream stream) throws IOException, InterruptedException
ModelOutput
for the specified properties.dataType
- the target data typepath
- the path about the target stream (for label)stream
- the target streamIOException
- if failed to create writerInterruptedException
- if interruptedIllegalArgumentException
- if this does not support property sequence,
or any parameter is null
Copyright © 2011–2018 Asakusa Framework Team. All rights reserved.