com.google.appengine.api.files.dev
Class BlobstoreFile
java.lang.Object
com.google.appengine.api.files.dev.FileMetadata
com.google.appengine.api.files.dev.BlobstoreFile
public class BlobstoreFile
- extends FileMetadata
Represents a file in the local file service that is stored in the BlobStore.
For each BlobStore file there are two instances of this class: one
corresponding to the creation-handle which is write-only, and one
corresponding to the blob key which is read-only. Each instance will
eventually contain both the creation handle and the blob key Strings so that
it is possible to find one from the other.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FILE_SYSTEM
public static final java.lang.String FILE_SYSTEM
CREATION_HANDLE_PREFIX
public static final java.lang.String CREATION_HANDLE_PREFIX
- See Also:
- Constant Field Values
buildFullPath
public static java.lang.String buildFullPath(java.lang.String namePart)
isSpecialReadOnlyName
public static boolean isSpecialReadOnlyName(ParsedFileName parsedName)
newInstance
public static FileMetadata newInstance(LocalFileService localFileService,
ParsedFileName parsedName,
OpenMode openMode,
ContentType contentType,
java.util.Map<java.lang.String,java.lang.String> parameters)
- Creates a new instance. There are two cases:
1) A create request
2) A read request for a special read-only file.
append
public void append(AppendRequest request)
- Description copied from class:
FileMetadata
- Handle an append request
- Specified by:
append
in class FileMetadata
- Parameters:
request
- the request
setFinalized
public void setFinalized()
- Overrides:
setFinalized
in class FileMetadata
read
public ByteString read(ReadRequest request)
- Description copied from class:
FileMetadata
- Handle a Read request
- Specified by:
read
in class FileMetadata
- Parameters:
request
- the request
- Returns:
- A
ByteString
containing the read bytes