public class GcsSession extends Object implements org.springframework.integration.file.remote.session.Session<BlobInfo>
Constructor and Description |
---|
GcsSession(Storage gcs) |
Modifier and Type | Method and Description |
---|---|
void |
append(InputStream inputStream,
String destination) |
void |
close() |
boolean |
exists(String path) |
boolean |
finalizeRaw() |
Object |
getClientInstance() |
String |
getHostPort() |
boolean |
isOpen() |
BlobInfo[] |
list(String bucket)
Only supports listing buckets, not folders.
|
String[] |
listNames(String path) |
boolean |
mkdir(String directory) |
void |
read(String source,
OutputStream outputStream) |
InputStream |
readRaw(String source) |
boolean |
remove(String path) |
void |
rename(String pathFrom,
String pathTo) |
boolean |
rmdir(String directory) |
void |
write(InputStream inputStream,
String destination) |
public GcsSession(Storage gcs)
public boolean remove(String path) throws IOException
remove
in interface org.springframework.integration.file.remote.session.Session<BlobInfo>
IOException
public BlobInfo[] list(String bucket) throws IOException
list
in interface org.springframework.integration.file.remote.session.Session<BlobInfo>
bucket
- The name of the bucket.IOException
- Thrown if there an issue communicating with GCS.public void read(String source, OutputStream outputStream) throws IOException
read
in interface org.springframework.integration.file.remote.session.Session<BlobInfo>
IOException
public void write(InputStream inputStream, String destination) throws IOException
write
in interface org.springframework.integration.file.remote.session.Session<BlobInfo>
IOException
public void append(InputStream inputStream, String destination) throws IOException
append
in interface org.springframework.integration.file.remote.session.Session<BlobInfo>
IOException
public boolean mkdir(String directory) throws IOException
mkdir
in interface org.springframework.integration.file.remote.session.Session<BlobInfo>
IOException
public boolean rmdir(String directory) throws IOException
rmdir
in interface org.springframework.integration.file.remote.session.Session<BlobInfo>
IOException
public void rename(String pathFrom, String pathTo) throws IOException
rename
in interface org.springframework.integration.file.remote.session.Session<BlobInfo>
IOException
public void close()
close
in interface Closeable
close
in interface AutoCloseable
close
in interface org.springframework.integration.file.remote.session.Session<BlobInfo>
public boolean isOpen()
isOpen
in interface org.springframework.integration.file.remote.session.Session<BlobInfo>
public boolean exists(String path) throws IOException
exists
in interface org.springframework.integration.file.remote.session.Session<BlobInfo>
IOException
public String[] listNames(String path) throws IOException
listNames
in interface org.springframework.integration.file.remote.session.Session<BlobInfo>
IOException
public InputStream readRaw(String source) throws IOException
readRaw
in interface org.springframework.integration.file.remote.session.Session<BlobInfo>
IOException
public boolean finalizeRaw() throws IOException
finalizeRaw
in interface org.springframework.integration.file.remote.session.Session<BlobInfo>
IOException
public Object getClientInstance()
getClientInstance
in interface org.springframework.integration.file.remote.session.Session<BlobInfo>
Copyright © 2021. All rights reserved.