Package com.jcabi.s3
Class Ocket.Text
java.lang.Object
com.jcabi.s3.Ocket.Text
- All Implemented Interfaces:
Ocket,Comparable<Ocket>
- Enclosing interface:
- Ocket
Unicode text S3 object with supplementary functions.
- Since:
- 0.1
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.jcabi.s3.Ocket
Ocket.Empty, Ocket.Text -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbucket()Get bucket we're in.intbooleanexists()Check whether this S3 object exists.key()Get object key.software.amazon.awssdk.services.s3.model.HeadObjectResponsemeta()Object metadata.read()Read content as string.voidread(OutputStream output) Read content.voidwrite(InputStream input, software.amazon.awssdk.services.s3.model.HeadObjectResponse meta) Write new content to the object.voidWrite content as string.voidWrite content as string, with a specified content type.
-
Constructor Details
-
Text
Public ctor.- Parameters:
ocket- Original ocket
-
-
Method Details
-
read
Read content as string.- Returns:
- Content
- Throws:
IOException- If fails
-
write
Write content as string.- Parameters:
text- Text to write- Throws:
IOException- If fails
-
write
Write content as string, with a specified content type.- Parameters:
text- Text to writetype- Content type- Throws:
IOException- If fails
-
bucket
Description copied from interface:OcketGet bucket we're in. -
key
Description copied from interface:OcketGet object key. -
meta
Description copied from interface:OcketObject metadata.Throws
OcketNotFoundExceptionif this object doesn't exist in S3 bucket.- Specified by:
metain interfaceOcket- Returns:
- Metadata
- Throws:
IOException- If fails
-
exists
Description copied from interface:OcketCheck whether this S3 object exists.- Specified by:
existsin interfaceOcket- Returns:
- TRUE if it exists in S3, FALSE otherwise
- Throws:
IOException- If fails
-
read
Description copied from interface:OcketRead content.Throws
OcketNotFoundExceptionif this object doesn't exist in S3 bucket.- Specified by:
readin interfaceOcket- Parameters:
output- Where to write- Throws:
IOException- If fails
-
write
public void write(InputStream input, software.amazon.awssdk.services.s3.model.HeadObjectResponse meta) throws IOException Description copied from interface:OcketWrite new content to the object.- Specified by:
writein interfaceOcket- Parameters:
input- Where to get contentmeta- Metadata to save- Throws:
IOException- If fails
-
compareTo
- Specified by:
compareToin interfaceComparable<Ocket>
-