Top Description Fields Constructors Methods
org.eclipse.persistence.internal.oxm

public Class ByteArraySource

extends StreamSource
Class Inheritance
Imports
java.io.InputStream, .InputStreamReader, .Reader, javax.xml.transform.stream.StreamSource

INTERNAL:

Purpose: Provides an implementation of Source that can act on a byte[]. Overrides the getInputStream and getReader methods to ensure a new stream is created each time (to prevent the one use restriction of StreamSource).

Author
mmacivor

Field Summary

Modifier and TypeField and Description
private ByteArrayDataSource
Inherited from javax.xml.transform.stream.StreamSource:
FEATURE

Constructor Summary

AccessConstructor and Description
public
ByteArraySource(byte[] bytes)

public
ByteArraySource(byte[] bytes, String mimeType)

public

Method Summary

Modifier and TypeMethod and Description
public InputStream
getInputStream()

Overrides javax.xml.transform.stream.StreamSource.getInputStream.

Get the byte stream that was set with setByteStream.
public Reader
getReader()

Overrides javax.xml.transform.stream.StreamSource.getReader.

Get the character stream that was set with setReader.
Inherited from javax.xml.transform.stream.StreamSource:
getPublicIdgetSystemIdisEmptysetInputStreamsetPublicIdsetReadersetSystemIdsetSystemId

Field Detail

sourceback to summary
private ByteArrayDataSource source

Constructor Detail

ByteArraySourceback to summary
public ByteArraySource(byte[] bytes)
ByteArraySourceback to summary
public ByteArraySource(byte[] bytes, String mimeType)
ByteArraySourceback to summary
public ByteArraySource(ByteArrayDataSource dataSource)

Method Detail

getInputStreamback to summary
public InputStream getInputStream()

Overrides javax.xml.transform.stream.StreamSource.getInputStream.

Doc from javax.xml.transform.stream.StreamSource.getInputStream.

Get the byte stream that was set with setByteStream.

Returns:InputStream

The byte stream that was set with setByteStream, or null if setByteStream or the ByteStream constructor was not called.

Annotations
@Override
getReaderback to summary
public Reader getReader()

Overrides javax.xml.transform.stream.StreamSource.getReader.

Doc from javax.xml.transform.stream.StreamSource.getReader.

Get the character stream that was set with setReader.

Returns:Reader

The character stream that was set with setReader, or null if setReader or the Reader constructor was not called.

Annotations
@Override