Package com.boomi.connector.util
Class BasePayload
- java.lang.Object
-
- com.boomi.connector.util.BasePayload
-
- All Implemented Interfaces:
ExtendedPayload,Payload,Closeable,AutoCloseable
public class BasePayload extends Object implements ExtendedPayload
Convenience base class for Payload implementations. None of the base methods do anything. This class has been moved from com.boomi.connector.api to com.boomi.connector.util.
-
-
Constructor Summary
Constructors Constructor Description BasePayload()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()PayloadMetadatagetMetadata()Returns a valid PayloadMetadata for this payload, ornullif no metadata is provided.InputStreamreadFrom()Returns a valid InputStream for this payload, ornullif not supported.voidwriteTo(OutputStream out)Writes the payload data to the given OutputStream.
-
-
-
Method Detail
-
readFrom
public InputStream readFrom() throws IOException
Description copied from interface:PayloadReturns a valid InputStream for this payload, ornullif not supported. If this method returns a valid InputStream,Payload.writeTo(java.io.OutputStream)will never be called.- Specified by:
readFromin interfacePayload- Throws:
IOException
-
writeTo
public void writeTo(OutputStream out) throws IOException
Description copied from interface:PayloadWrites the payload data to the given OutputStream. IfPayload.readFrom()returnsnull, this method must be implemented.- Specified by:
writeToin interfacePayload- Parameters:
out- non-nulloutput stream to which to write the payload data- Throws:
IOException
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
getMetadata
public PayloadMetadata getMetadata()
Description copied from interface:ExtendedPayloadReturns a valid PayloadMetadata for this payload, ornullif no metadata is provided.- Specified by:
getMetadatain interfaceExtendedPayload
-
-