public class BatchFileEntry extends Object
TransientStore
.
The file can be chunked or not. If it is chunked it references its chunks as TransientStore
entry keys.
Batch
Modifier and Type | Field and Description |
---|---|
protected Blob |
blob |
protected Blob |
chunkedBlob |
protected String |
key |
protected static org.apache.commons.logging.Log |
log |
protected Map<String,Serializable> |
params |
Modifier | Constructor and Description |
---|---|
|
BatchFileEntry(String key,
Blob blob)
Returns a file entry that holds the given blob, not chunked.
|
protected |
BatchFileEntry(String key,
boolean chunked) |
|
BatchFileEntry(String key,
int chunkCount,
String fileName,
String mimeType,
long fileSize)
Returns a file entry that references the file chunks.
|
|
BatchFileEntry(String key,
Map<String,Serializable> params)
Returns a file entry that holds the given parameters.
|
Modifier and Type | Method and Description |
---|---|
String |
addChunk(int index,
Blob blob) |
void |
beforeRemove() |
Blob |
getBlob() |
protected Blob |
getChunk(TransientStore ts,
String key) |
int |
getChunkCount() |
Collection<String> |
getChunkEntryKeys() |
Map<Integer,String> |
getChunks() |
String |
getFileName() |
long |
getFileSize() |
String |
getKey() |
String |
getMimeType() |
List<Integer> |
getOrderedChunkIndexes() |
Map<String,Serializable> |
getParams() |
boolean |
isChunked() |
boolean |
isChunksCompleted() |
protected void |
transferTo(Blob blob,
File file)
Appends the given blob to the given file.
|
protected static final org.apache.commons.logging.Log log
protected Map<String,Serializable> params
protected Blob chunkedBlob
public BatchFileEntry(String key, Blob blob)
public BatchFileEntry(String key, int chunkCount, String fileName, String mimeType, long fileSize)
BatchChunkEntry
public BatchFileEntry(String key, Map<String,Serializable> params)
protected BatchFileEntry(String key, boolean chunked)
public Map<String,Serializable> getParams()
public boolean isChunked()
public String getFileName()
public String getMimeType()
public long getFileSize()
public int getChunkCount()
public List<Integer> getOrderedChunkIndexes()
public Collection<String> getChunkEntryKeys()
public boolean isChunksCompleted()
protected Blob getChunk(TransientStore ts, String key)
protected void transferTo(Blob blob, File file) throws IOException
IOException
public void beforeRemove()
Copyright © 2017 Nuxeo. All rights reserved.