com.google.appengine.api.files.dev
Class FileMetadata
java.lang.Object
com.google.appengine.api.files.dev.FileMetadata
- Direct Known Subclasses:
- BlobstoreFile
public abstract class FileMetadata
- extends java.lang.Object
This class represents a single file stored by the local file service. This
class is abstract. There are concrete subclasses corresponding to each of the
concrete backend storage repositories.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
contentType
protected ContentType contentType
finalized
protected boolean finalized
FileMetadata
public FileMetadata(ContentType contentType)
setFinalized
public void setFinalized()
isFinalized
public boolean isFinalized()
getContentType
public ContentType getContentType()
lock
public void lock(Session session)
getLockState
public FileMetadata.LockState getLockState(Session session)
setState
public void setState(FileMetadata.OpenState state,
Session session)
getOpenState
public FileMetadata.OpenState getOpenState(Session session)
isOpenInDifferentSession
public boolean isOpenInDifferentSession(Session session)
read
public abstract ByteString read(ReadRequest request)
- Handle a Read request
- Parameters:
request
- the request
- Returns:
- A
ByteString
containing the read bytes
append
public abstract void append(AppendRequest request)
- Handle an append request
- Parameters:
request
- the request
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 of
FileMetadata
. This method is called in
response to two types of requests: A Create request or the first Read
request of a special read-only file.