The bundle is read from an unbuffered input stream, which limits the transport to opening at most one FetchConnection before needing to recreate the transport instance.
| Modifier and Type | Field and Description |
|---|---|
| private InputStream |
| Access | Constructor and Description |
|---|---|
| public | TransportBundleStream(final Repository
repository the fetched objects will be loaded into. db, final URIish symbolic name of the source of the stream. The URI can
reference a non-existent resource. It is used only for
exception reporting. uri, final InputStream the stream to read the bundle from. in)Create a new transport to fetch objects from a streamed bundle. |
| Modifier and Type | Method and Description |
|---|---|
| public void | close()
Implements abstract org. Implements java. Closes this resource, relinquishing any underlying resources. |
| public FetchConnection | openFetch()
Implements abstract org. Begins a new connection for fetching from the remote repository. |
| public PushConnection | openPush()
Implements abstract org. Begins a new connection for pushing into the remote repository. |
| src | back to summary |
|---|---|
| private InputStream src | |
| TransportBundleStream | back to summary |
|---|---|
| public TransportBundleStream(final Repository db, final URIish uri, final InputStream in) Create a new transport to fetch objects from a streamed bundle. The stream can be unbuffered (buffering is automatically provided internally to smooth out short reads) and unpositionable (the stream is read from only once, sequentially). When the FetchConnection or the this instance is closed the supplied input stream is also automatically closed. This frees callers from needing to keep track of the supplied stream.
| |
| close | back to summary |
|---|---|
| public void close() Implements abstract org. Implements java. Doc from org. Closes this resource, relinquishing any underlying resources.
This method is invoked automatically on objects managed by the
Close any resources used by this transport. If the remote repository is contacted by a network socket this method must close that network socket, disconnecting the two peers. If the remote repository is actually local (same system) this method must close any open file handles used to read the "remote" repository.
| |
| openFetch | back to summary |
|---|---|
| public FetchConnection openFetch() throws TransportException Implements abstract org. Doc from org. Begins a new connection for fetching from the remote repository. If the transport has no local repository, the fetch connection can only be used for reading remote refs.
| |
| openPush | back to summary |
|---|---|
| public PushConnection openPush() throws NotSupportedException Implements abstract org. Doc from org. Begins a new connection for pushing into the remote repository.
| |