public class GCSOutputFile extends java.lang.Object implements OutputFile
| Modifier and Type | Method and Description |
|---|---|
PositionOutputStream |
create()
Create an output stream for the specified location if the target object
does not exist in GCS at the time of invocation.
|
PositionOutputStream |
createOrOverwrite()
Create a new file and return a
PositionOutputStream to it. |
boolean |
exists() |
static GCSOutputFile |
fromLocation(java.lang.String location,
com.google.cloud.storage.Storage storage,
GCPProperties gcpProperties) |
protected GCPProperties |
gcpProperties() |
protected com.google.cloud.storage.Blob |
getBlob() |
java.lang.String |
location() |
InputFile |
toInputFile()
Return an
InputFile for the location of this output file. |
java.lang.String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitlocationpublic static GCSOutputFile fromLocation(java.lang.String location, com.google.cloud.storage.Storage storage, GCPProperties gcpProperties)
public PositionOutputStream create()
create in interface OutputFilepublic PositionOutputStream createOrOverwrite()
OutputFilePositionOutputStream to it.
If the file already exists, this will not throw an exception and will replace the file.
createOrOverwrite in interface OutputFilepublic InputFile toInputFile()
OutputFileInputFile for the location of this output file.toInputFile in interface OutputFilepublic java.lang.String location()
protected GCPProperties gcpProperties()
public boolean exists()
protected com.google.cloud.storage.Blob getBlob()
public java.lang.String toString()
toString in class java.lang.Object