Type Parameters:
C - the handled content representation
R - the serialization when reading the content
from a response
All Superinterfaces:
AbstractReadHandle ,
AbstractWriteHandle ,
BufferableHandle ,
ContentHandle <C>
All Known Subinterfaces:
ResendableContentHandle <C, R>,
StreamingContentHandle <C, R>
All Known Implementing Classes:
BytesHandle ,
DOM4JHandle ,
DOMHandle ,
FileHandle ,
GSONHandle ,
InputSourceHandle ,
InputStreamHandle ,
JacksonDatabindHandle ,
JacksonHandle ,
JacksonParserHandle ,
JAXBHandle ,
JDOMHandle ,
ReaderHandle ,
SourceHandle ,
StringHandle ,
XMLEventReaderHandle ,
XMLStreamReaderHandle
A Bufferable Content Handle provides an adapter
for a content representation that can be read multiple times for
purposes such as resending input when retrying after a failed
request.
Method Summary
All Methods Instance Methods Abstract Methods Default Methods
Converts a byte serialization to the content
representation.
byte[]
Converts the content representation to
bytes.
Constructs a new handle for the same content
representation, initializing the new handle with the same format
and mime type.
Constructs a new handle for the same content
representation, initializing the new handle with the same format
and mime type and new content.
Constructs an uninitialized array with the
specified length with items of the same content
representation.
Provides a handle that can resend the
content.
Provides an array of handles that can resend an
array of content.
Converts the serialization to the content
representation.
Method Details
toContent
C toContent (R serialization)
Converts the serialization to the content
representation.
Parameters:
serialization - a serialization of the
content
Returns:
the content representation
bytesToContent
C bytesToContent (byte[] buffer)
Converts a byte serialization to the content
representation.
Parameters:
buffer - the byte serialization
Returns:
the content representation
contentToBytes
byte[] contentToBytes (C content)
Converts the content representation to
bytes.
Parameters:
content - the content
Returns:
the byte serialization of the content
newHandle
Constructs a new handle for the same content
representation, initializing the new handle with the same format
and mime type.
Specified by:
newHandle in
interface ContentHandle <C >
Returns:
the new handle
newHandle
Constructs a new handle for the same content
representation, initializing the new handle with the same format
and mime type and new content.
Specified by:
newHandle in
interface ContentHandle <C >
Parameters:
content - the new content to initialize the new
handle
Returns:
the new handle
newHandleArray
Constructs an uninitialized array with the
specified length with items of the same content
representation.
Parameters:
length - the number of positions in the array
Returns:
the uninitialized array
resendableHandleFor
Provides a handle that can resend the
content.
Parameters:
content - the content
Returns:
the resendable handle
resendableHandleFor
Provides an array of handles that can resend an
array of content.
Parameters:
content - the array of content
Returns:
the array of resendable handles
Copyright (c) 2010-2026 Progress
Software Corporation and/or its subsidiaries or affiliates. All
Rights Reserved.