org.axonframework.serializer.converters
Class InputStreamToByteArrayConverter
java.lang.Object
org.axonframework.serializer.AbstractContentTypeConverter<InputStream,byte[]>
org.axonframework.serializer.converters.InputStreamToByteArrayConverter
- All Implemented Interfaces:
- ContentTypeConverter<InputStream,byte[]>
public class InputStreamToByteArrayConverter
- extends AbstractContentTypeConverter<InputStream,byte[]>
Converter that converts an InputStream to a byte array. This converter simply reads all contents from the
input stream and returns that as an array.
- Since:
- 2.0
- Author:
- Allard Buijze
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
InputStreamToByteArrayConverter
public InputStreamToByteArrayConverter()
expectedSourceType
public Class<InputStream> expectedSourceType()
- Description copied from interface:
ContentTypeConverter
- The expected type of input data.
- Returns:
- the expected data format in IntermediateRepresentation
targetType
public Class<byte[]> targetType()
- Description copied from interface:
ContentTypeConverter
- The returned type of IntermediateRepresentation
- Returns:
- the output data format in IntermediateRepresentation
convert
public byte[] convert(InputStream original)
- Description copied from interface:
ContentTypeConverter
- Converts the given object into another. Typically, these values are contained by a
SerializedObject
instance.
- Parameters:
original
- the value to convert
- Returns:
- the converted value
Copyright © 2010-2016. All Rights Reserved.