public class BlobstoreFile extends FileMetadata
FileMetadata.LockState, FileMetadata.OpenState| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
CREATION_HANDLE_PREFIX |
static java.lang.String |
FILE_SYSTEM |
appendName, contentType, currentSequenceKey, finalized, readName, tempBytes, tempBytesSizeWhenFinalized| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
buildFullPath(java.lang.String namePart) |
static FileMetadata |
create(LocalFileService localFileService,
Clock clock,
java.lang.String fileName,
java.lang.String randomString,
ContentType contentType,
java.util.Map<java.lang.String,java.lang.String> parameters)
Creates a new instance for a non-finalized file.
|
com.google.appengine.api.blobstore.BlobInfo |
getBlobInfo() |
protected java.io.InputStream |
getInputStream() |
protected java.io.OutputStream |
getOutputStream() |
static FileMetadata |
newFinalizedInstance(LocalFileService localFileService,
Clock clock,
ParsedFileName parsedName)
Given a
ParsedFileName for a Blobstore file that is expected to
have been finalized, this method will attempt to construct and return a new
FileMetadata instance for the file. |
void |
setFinalized() |
append, checkParameters, copy, getAppendName, getContentType, getLockState, getOpenState, getTempBytesSize, isFinalized, isOpenInDifferentSession, lock, newReadableInstance, read, saveBlobInfo, setStatepublic static final java.lang.String FILE_SYSTEM
public static final java.lang.String CREATION_HANDLE_PREFIX
public static java.lang.String buildFullPath(java.lang.String namePart)
public static FileMetadata create(LocalFileService localFileService, Clock clock, java.lang.String fileName, java.lang.String randomString, ContentType contentType, java.util.Map<java.lang.String,java.lang.String> parameters)
public static FileMetadata newFinalizedInstance(LocalFileService localFileService, Clock clock, ParsedFileName parsedName)
ParsedFileName for a Blobstore file that is expected to
have been finalized, this method will attempt to construct and return a new
FileMetadata instance for the file. If the file name represents a
blob key, then an instance will be returned wrapping the blob key. If the
name represents a creation handle then this method will query the datastore
in order to find a blob key corresponding to the creation handle. If one is
found then an instance will be returned. Otherwise null will be
returned.FileMetadata or null if no
corresponding entity could be found in the datastore.public com.google.appengine.api.blobstore.BlobInfo getBlobInfo()
getBlobInfo in class FileMetadataBlobInfo of the file. File must have been finalized.public void setFinalized()
setFinalized in class FileMetadataprotected java.io.OutputStream getOutputStream()
throws java.io.IOException
getOutputStream in class FileMetadatajava.io.IOExceptionprotected java.io.InputStream getInputStream()
throws java.io.IOException
getInputStream in class FileMetadatajava.io.IOException