Class StorageConnector.Coupled

java.lang.Object
org.apache.sis.storage.StorageConnector.Coupled
Enclosing class:
StorageConnector

private static final class StorageConnector.Coupled extends Object
Wraps an instance of @link InputStream}, DataInput, Reader, etc. together with additional information about other objects that are coupled with the wrapped object. For example if a Reader is a wrapper around the user supplied InputStream, then those two objects will be wrapped in Coupled instances together with information about how they are related One purpose of Coupled information is to keep trace of objects which will need to be closed by the StorageConnector.closeAllExcept(Object) method (for example an InputStreamReader wrapping an InputStream). Another purpose is to determine which views need to be synchronized if StorageConnector.storage is used independently. They are views that may advance storage position, but not at the same time than the view position (typically because the view reads some bytes in advance and stores them in a buffer). Such coupling may occur when the storage is an InputStream, an OutputStream or a Channel. The coupled view can be: