Package org.apache.maven.wagon
Interface StreamingWagon
- All Superinterfaces:
Wagon
- All Known Implementing Classes:
StreamWagon
-
Field Summary
Fields inherited from interface org.apache.maven.wagon.Wagon
DEFAULT_CONNECTION_TIMEOUT, DEFAULT_READ_TIMEOUT, ROLE
-
Method Summary
Modifier and TypeMethodDescriptionboolean
getIfNewerToStream
(String resourceName, OutputStream stream, long timestamp) Downloads specified resource from the repository if it was modified since specified date.void
getToStream
(String resourceName, OutputStream stream) Downloads specified resource from the repository to given output stream.void
putFromStream
(InputStream stream, String destination) Deprecated.due to unknown contentLength various http(s) implementation will use a chuncked transfer encoding mode you must take care you http target server supports that (ngnix don't !).void
putFromStream
(InputStream stream, String destination, long contentLength, long lastModified) Copy from a local input stream to remote.Methods inherited from interface org.apache.maven.wagon.Wagon
addSessionListener, addTransferListener, connect, connect, connect, connect, connect, connect, disconnect, get, getFileList, getIfNewer, getReadTimeout, getRepository, getTimeout, hasSessionListener, hasTransferListener, isInteractive, openConnection, put, putDirectory, removeSessionListener, removeTransferListener, resourceExists, setInteractive, setReadTimeout, setTimeout, supportsDirectoryCopy
-
Method Details
-
getToStream
void getToStream(String resourceName, OutputStream stream) throws ResourceDoesNotExistException, TransferFailedException, AuthorizationException Downloads specified resource from the repository to given output stream.- Parameters:
resourceName
-stream
-- Throws:
TransferFailedException
ResourceDoesNotExistException
AuthorizationException
AuthorizationException
-
getIfNewerToStream
boolean getIfNewerToStream(String resourceName, OutputStream stream, long timestamp) throws ResourceDoesNotExistException, TransferFailedException, AuthorizationException Downloads specified resource from the repository if it was modified since specified date. The date is measured in milliseconds, between the current time and midnight, January 1, 1970 UTC and aligned to GMT timezone.- Parameters:
resourceName
-stream
-timestamp
-- Returns:
true
if newer resource has been downloaded,false
if resource in the repository is older or has the same age.- Throws:
TransferFailedException
ResourceDoesNotExistException
AuthorizationException
AuthorizationException
-
putFromStream
void putFromStream(InputStream stream, String destination) throws TransferFailedException, ResourceDoesNotExistException, AuthorizationException Deprecated.due to unknown contentLength various http(s) implementation will use a chuncked transfer encoding mode you must take care you http target server supports that (ngnix don't !). So in case of http(s) transport layer avoid using this. Will be remove in 3.0 Copy from a local input stream to remote.- Parameters:
stream
- the local streamdestination
- the remote destination- Throws:
TransferFailedException
ResourceDoesNotExistException
AuthorizationException
-
putFromStream
void putFromStream(InputStream stream, String destination, long contentLength, long lastModified) throws TransferFailedException, ResourceDoesNotExistException, AuthorizationException Copy from a local input stream to remote.- Parameters:
stream
- the local streamdestination
- the remote destination- Throws:
TransferFailedException
ResourceDoesNotExistException
AuthorizationException
-