public interface DataSwap extends Closeable
A swap can be used for storing data temporarily.
A swap consists of a DataTarget
which can be used to write the data
and a DataSource
to read it afterwards. When the swap is closed the
stored data will be deleted.
Modifier and Type | Method and Description |
---|---|
DataSource |
getSource()
Returns the source.
|
DataTarget |
getTarget()
Returns the target.
|
DataTarget getTarget() throws IOException
Returns the target.
Subsequent calls will return the same target.
IllegalStateException
- If the getSource()
method has been already called.IOException
- If an I/O error occurs while creating the target.DataSource getSource() throws IOException
Returns the source.
Subsequent calls will return the same source.
IllegalStateException
- If the getTarget()
method hasn't been called before.IOException
- If an I/O error occurs while creating the source.Copyright © 2015–2019. All rights reserved.