@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class Document extends Object implements Serializable, Cloneable, StructuredPojo
The content and content type of a document.
Constructor and Description |
---|
Document() |
Modifier and Type | Method and Description |
---|---|
Document |
clone() |
boolean |
equals(Object obj) |
ByteBuffer |
getContent()
The
Content field type is Binary large object (blob). |
String |
getContentType()
Describes the format of the document.
|
int |
hashCode() |
void |
marshall(ProtocolMarshaller protocolMarshaller)
Marshalls this structured data using the given
ProtocolMarshaller . |
void |
setContent(ByteBuffer content)
The
Content field type is Binary large object (blob). |
void |
setContentType(String contentType)
Describes the format of the document.
|
String |
toString()
Returns a string representation of this object.
|
Document |
withContent(ByteBuffer content)
The
Content field type is Binary large object (blob). |
Document |
withContentType(String contentType)
Describes the format of the document.
|
public void setContent(ByteBuffer content)
The Content
field type is Binary large object (blob). This object contains the document content
converted into base64-encoded binary data. If you use one of the AWS SDKs, the SDK performs the Base64-encoding
on this field before sending the request.
The AWS SDK for Java performs a Base64 encoding on this field before sending this request to the AWS service. Users of the SDK should not perform Base64 encoding on this field.
Warning: ByteBuffers returned by the SDK are mutable. Changes to the content or position of the byte buffer will be seen by all objects that have a reference to this object. It is recommended to call ByteBuffer.duplicate() or ByteBuffer.asReadOnlyBuffer() before using or reading from the buffer. This behavior will be changed in a future major version of the SDK.
content
- The Content
field type is Binary large object (blob). This object contains the document
content converted into base64-encoded binary data. If you use one of the AWS SDKs, the SDK performs the
Base64-encoding on this field before sending the request.public ByteBuffer getContent()
The Content
field type is Binary large object (blob). This object contains the document content
converted into base64-encoded binary data. If you use one of the AWS SDKs, the SDK performs the Base64-encoding
on this field before sending the request.
ByteBuffer
s are stateful. Calling their get
methods changes their position
. We recommend
using ByteBuffer.asReadOnlyBuffer()
to create a read-only view of the buffer with an independent
position
, and calling get
methods on this rather than directly on the returned ByteBuffer
.
Doing so will ensure that anyone else using the ByteBuffer
will not be affected by changes to the
position
.
Content
field type is Binary large object (blob). This object contains the document
content converted into base64-encoded binary data. If you use one of the AWS SDKs, the SDK performs the
Base64-encoding on this field before sending the request.public Document withContent(ByteBuffer content)
The Content
field type is Binary large object (blob). This object contains the document content
converted into base64-encoded binary data. If you use one of the AWS SDKs, the SDK performs the Base64-encoding
on this field before sending the request.
The AWS SDK for Java performs a Base64 encoding on this field before sending this request to the AWS service. Users of the SDK should not perform Base64 encoding on this field.
Warning: ByteBuffers returned by the SDK are mutable. Changes to the content or position of the byte buffer will be seen by all objects that have a reference to this object. It is recommended to call ByteBuffer.duplicate() or ByteBuffer.asReadOnlyBuffer() before using or reading from the buffer. This behavior will be changed in a future major version of the SDK.
content
- The Content
field type is Binary large object (blob). This object contains the document
content converted into base64-encoded binary data. If you use one of the AWS SDKs, the SDK performs the
Base64-encoding on this field before sending the request.public void setContentType(String contentType)
Describes the format of the document. You can specify one of the following:
text/html
- The input data consists of HTML content. Amazon Translate translates only the text in
the HTML element.
text/plain
- The input data consists of unformatted text. Amazon Translate translates every
character in the content.
application/vnd.openxmlformats-officedocument.wordprocessingml.document
- The input data consists of
a Word document (.docx).
contentType
- Describes the format of the document. You can specify one of the following:
text/html
- The input data consists of HTML content. Amazon Translate translates only the
text in the HTML element.
text/plain
- The input data consists of unformatted text. Amazon Translate translates every
character in the content.
application/vnd.openxmlformats-officedocument.wordprocessingml.document
- The input data
consists of a Word document (.docx).
public String getContentType()
Describes the format of the document. You can specify one of the following:
text/html
- The input data consists of HTML content. Amazon Translate translates only the text in
the HTML element.
text/plain
- The input data consists of unformatted text. Amazon Translate translates every
character in the content.
application/vnd.openxmlformats-officedocument.wordprocessingml.document
- The input data consists of
a Word document (.docx).
text/html
- The input data consists of HTML content. Amazon Translate translates only the
text in the HTML element.
text/plain
- The input data consists of unformatted text. Amazon Translate translates every
character in the content.
application/vnd.openxmlformats-officedocument.wordprocessingml.document
- The input data
consists of a Word document (.docx).
public Document withContentType(String contentType)
Describes the format of the document. You can specify one of the following:
text/html
- The input data consists of HTML content. Amazon Translate translates only the text in
the HTML element.
text/plain
- The input data consists of unformatted text. Amazon Translate translates every
character in the content.
application/vnd.openxmlformats-officedocument.wordprocessingml.document
- The input data consists of
a Word document (.docx).
contentType
- Describes the format of the document. You can specify one of the following:
text/html
- The input data consists of HTML content. Amazon Translate translates only the
text in the HTML element.
text/plain
- The input data consists of unformatted text. Amazon Translate translates every
character in the content.
application/vnd.openxmlformats-officedocument.wordprocessingml.document
- The input data
consists of a Word document (.docx).
public String toString()
toString
in class Object
Object.toString()
public void marshall(ProtocolMarshaller protocolMarshaller)
StructuredPojo
ProtocolMarshaller
.marshall
in interface StructuredPojo
protocolMarshaller
- Implementation of ProtocolMarshaller
used to marshall this object's data.