Class FixedFormatSerializerImpl
java.lang.Object
org.apache.olingo.server.core.serializer.FixedFormatSerializerImpl
- All Implemented Interfaces:
FixedFormatSerializer
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionasyncResponse(ODataResponse odataResponse) Serializes a ODataResponse into an async response.batchResponse(List<ODataResponsePart> batchResponses, String boundary) Serializes a batch response.binary(byte[] binary) Writes binary output into an InputStream.protected voidbinary(InputStream inputStream, OutputStream outputStream) protected voidbinary(EntityMediaObject mediaEntity, OutputStream outputStream) voidbinaryIntoStreamed(InputStream inputStream, OutputStream outputStream) voidbinaryIntoStreamed(EntityMediaObject mediaEntity, OutputStream outputStream) Writes a count into an InputStream as plain text.mediaEntityStreamed(InputStream inputStream) Writes Input stream to an output streammediaEntityStreamed(EntityMediaObject mediaEntity) Writes bytes to an Output streamprimitiveValue(EdmPrimitiveType type, Object value, PrimitiveValueSerializerOptions options) Writes the raw value of a primitive-type instance into an InputStream.
-
Field Details
-
COPY_BUFFER_SIZE
public static final int COPY_BUFFER_SIZE- See Also:
-
-
Constructor Details
-
FixedFormatSerializerImpl
public FixedFormatSerializerImpl()
-
-
Method Details
-
binary
Description copied from interface:FixedFormatSerializerWrites binary output into an InputStream.- Specified by:
binaryin interfaceFixedFormatSerializer- Parameters:
binary- the binary data- Throws:
SerializerException
-
binary
protected void binary(EntityMediaObject mediaEntity, OutputStream outputStream) throws SerializerException - Throws:
SerializerException
-
binary
protected void binary(InputStream inputStream, OutputStream outputStream) throws SerializerException - Throws:
SerializerException
-
binaryIntoStreamed
public void binaryIntoStreamed(EntityMediaObject mediaEntity, OutputStream outputStream) throws SerializerException - Throws:
SerializerException
-
binaryIntoStreamed
public void binaryIntoStreamed(InputStream inputStream, OutputStream outputStream) throws SerializerException - Throws:
SerializerException
-
mediaEntityStreamed
public SerializerStreamResult mediaEntityStreamed(EntityMediaObject mediaEntity) throws SerializerException Description copied from interface:FixedFormatSerializerWrites bytes to an Output stream- Specified by:
mediaEntityStreamedin interfaceFixedFormatSerializer- Parameters:
mediaEntity- bytes- Returns:
- Throws:
SerializerException
-
mediaEntityStreamed
public SerializerStreamResult mediaEntityStreamed(InputStream inputStream) throws SerializerException Description copied from interface:FixedFormatSerializerWrites Input stream to an output stream- Specified by:
mediaEntityStreamedin interfaceFixedFormatSerializer- Parameters:
inputStream- inputStream- Returns:
- Throws:
SerializerException
-
count
Description copied from interface:FixedFormatSerializerWrites a count into an InputStream as plain text.- Specified by:
countin interfaceFixedFormatSerializer- Parameters:
count- the count- Throws:
SerializerException
-
primitiveValue
public InputStream primitiveValue(EdmPrimitiveType type, Object value, PrimitiveValueSerializerOptions options) throws SerializerException Description copied from interface:FixedFormatSerializerWrites the raw value of a primitive-type instance into an InputStream.- Specified by:
primitiveValuein interfaceFixedFormatSerializer- Parameters:
type- the primitive typevalue- the valueoptions- options for the serializer- Throws:
SerializerException
-
asyncResponse
Description copied from interface:FixedFormatSerializerSerializes a ODataResponse into an async response.- Specified by:
asyncResponsein interfaceFixedFormatSerializer- Parameters:
odataResponse- the response parts- Returns:
- response as an input stream
- Throws:
SerializerException
-
batchResponse
public InputStream batchResponse(List<ODataResponsePart> batchResponses, String boundary) throws BatchSerializerException Description copied from interface:FixedFormatSerializerSerializes a batch response.- Specified by:
batchResponsein interfaceFixedFormatSerializer- Parameters:
batchResponses- the response partsboundary- the boundary between the parts- Returns:
- response as an input stream
- Throws:
BatchSerializerException
-