Package org.syncany.chunk
Class ZipMultiChunker
- java.lang.Object
-
- org.syncany.chunk.MultiChunker
-
- org.syncany.chunk.ZipMultiChunker
-
public class ZipMultiChunker extends MultiChunker
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringTYPE-
Fields inherited from class org.syncany.chunk.MultiChunker
minMultiChunkSize, PROPERTY_SIZE
-
-
Constructor Summary
Constructors Constructor Description ZipMultiChunker()ZipMultiChunker(int minMultiChunkSize)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MultiChunkcreateMultiChunk(java.io.File file)Open existing multichunk in read mode using an underlying file.MultiChunkcreateMultiChunk(java.io.InputStream is)Open existing multichunk in read mode using an underlying input stream.MultiChunkcreateMultiChunk(MultiChunkEntry.MultiChunkId id, java.io.OutputStream os)Create a new multichunk in write mode.java.lang.StringtoString()Returns a comprehensive string representation of a multichunker-
Methods inherited from class org.syncany.chunk.MultiChunker
getInstance, init
-
-
-
-
Field Detail
-
TYPE
public static final java.lang.String TYPE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ZipMultiChunker
public ZipMultiChunker()
-
ZipMultiChunker
public ZipMultiChunker(int minMultiChunkSize)
-
-
Method Detail
-
createMultiChunk
public MultiChunk createMultiChunk(java.io.InputStream is)
Description copied from class:MultiChunkerOpen existing multichunk in read mode using an underlying input stream.Using this method only allows reading from the returned multichunk. The underlying input stream is opened and can be used to retrieve chunk data.
- Specified by:
createMultiChunkin classMultiChunker- Parameters:
is- InputStream to initialize an existing multichunk for read-operations only- Returns:
- Returns an existing multichunk object that allows read operations only
-
createMultiChunk
public MultiChunk createMultiChunk(java.io.File file) throws java.io.IOException
Description copied from class:MultiChunkerOpen existing multichunk in read mode using an underlying file.Using this method only allows reading from the returned multichunk. The underlying input stream is opened and can be used to retrieve chunk data.
- Specified by:
createMultiChunkin classMultiChunker- Parameters:
file- File to read into a multichunk for read-operations only- Returns:
- Returns an existing multichunk object that allows read operations only
- Throws:
java.io.IOException
-
createMultiChunk
public MultiChunk createMultiChunk(MultiChunkEntry.MultiChunkId id, java.io.OutputStream os) throws java.io.IOException
Description copied from class:MultiChunkerCreate a new multichunk in write mode.Using this method only allows writing to the returned multichunk. The resulting data will be written to the underlying output stream given in the parameter.
- Specified by:
createMultiChunkin classMultiChunker- Parameters:
id- Identifier of the newly created multichunkos- Underlying output stream to write the new multichunk to- Returns:
- Returns a new multichunk object which can only be used for writing
- Throws:
java.io.IOException
-
toString
public java.lang.String toString()
Description copied from class:MultiChunkerReturns a comprehensive string representation of a multichunker- Specified by:
toStringin classMultiChunker
-
-