|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.duracloud.chunk.FileChunker
public class FileChunker
This class provides the ability to loop over a directory of content which may include files over 5-GB in size, chunk, and push them to a DataStore encapsulated by the member: ContentWriter. A ContentWriter may push to any DataStore, such as: - a filesystem or - a DuraCloud space
Constructor Summary | |
---|---|
FileChunker(ContentWriter contentWriter)
|
|
FileChunker(ContentWriter contentWriter,
FileChunkerOptions options)
|
Method Summary | |
---|---|
void |
addContent(String destSpaceId,
String destContentId,
String fileChecksum,
File file)
This method pushes the content file to the space destSpaceId with the content ID destContentId |
protected void |
addContentFrom(File baseDir,
String destSpaceId)
This method loops the arg baseDir and pushes the found content to the arg destSpace. |
static DigestInputStream |
createTestContent(File outFile,
long size)
This method generates a test file with random char content. |
protected void |
writeReport(File outputFile)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FileChunker(ContentWriter contentWriter)
public FileChunker(ContentWriter contentWriter, FileChunkerOptions options)
Method Detail |
---|
protected void writeReport(File outputFile)
public void addContent(String destSpaceId, String destContentId, String fileChecksum, File file)
destSpaceId
- of content destinationdestContentId
- of contentfileChecksum
- MD5 checksum of file or null if not knownfile
- to addprotected void addContentFrom(File baseDir, String destSpaceId)
baseDir
- of content to push to DataStoredestSpaceId
- of content destinationpublic static DigestInputStream createTestContent(File outFile, long size) throws IOException
outFile
- of test filesize
- number of bytes in test file
IOException
- on error
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |