Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.google.appengine.api.files.dev
Class GSFile

    java.lang.Object
      com.google.appengine.api.files.dev.FileMetadata
          com.google.appengine.api.files.dev.GSFile

    public class GSFile

extends FileMetadata

A Google Cloud Storage object represented by a local file in blobstore. Appendable versions of GSFiles have paths of the form /gs/writable:random?name=bucket%2fkey. Unfinalized bytes are stored in memory. Finalizing an object copies the bytes to a local blobstore file, which is accessible at /gs/bucket/key.

Nested Class Summary

Nested classes/interfaces inherited from class com.google.appengine.api.files.dev.FileMetadata
`FileMetadata.LockState, FileMetadata.OpenState`

Field Summary
`static java.lang.String` | `CREATION_HANDLE_PREFIX`
`static java.lang.String` | `FILE_SYSTEM`

Fields inherited from class com.google.appengine.api.files.dev.FileMetadata
`appendName, contentType, currentSequenceKey, finalized, readName, tempBytes`

Method Summary
`static java.lang.String` | `buildWritablePath(java.lang.String randomString, java.lang.String fileName)`
`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.
`protected java.io.InputStream` | `getInputStream()`
`protected java.io.OutputStream` | `getOutputStream()`
`protected static FileMetadata` | `newFinalizedInstance(LocalFileService localFileService, Clock clock, ParsedFileName parsedName)`
`void` | `setFinalized()`

Methods inherited from class com.google.appengine.api.files.dev.FileMetadata
`append, checkParameters, copy, getAppendName, getContentType, getLockState, getOpenState, isFinalized, isOpenInDifferentSession, lock, newReadableInstance, read, saveBlobInfo, setState`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### 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

Method Detail

### buildWritablePath

    public static java.lang.String buildWritablePath(java.lang.String randomString,
                                                     java.lang.String fileName)

### create

    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)

  Creates a new instance. There are two cases: 1) A create request 2) A read request for a special read-only file.

### newFinalizedInstance

    protected static FileMetadata newFinalizedInstance(LocalFileService localFileService,
                                                       Clock clock,
                                                       ParsedFileName parsedName)

### setFinalized

    public void setFinalized()

  Overrides:
    `setFinalized` in class `FileMetadata`

### getOutputStream

    protected java.io.OutputStream getOutputStream()
                                            throws java.io.IOException

  Specified by:
    `getOutputStream` in class `FileMetadata`
  Throws:
    `java.io.IOException`

### getInputStream

    protected java.io.InputStream getInputStream()
                                          throws java.io.IOException

  Specified by:
    `getInputStream` in class `FileMetadata`
  Throws:
    `java.io.IOException`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD