Class ByteArraySource
- java.lang.Object
-
- javax.xml.transform.stream.StreamSource
-
- org.eclipse.persistence.internal.oxm.ByteArraySource
-
- All Implemented Interfaces:
Source
public class ByteArraySource extends 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
-
Fields inherited from class javax.xml.transform.stream.StreamSource
FEATURE
-
-
Constructor Summary
Constructors Constructor Description ByteArraySource(byte[] bytes)
ByteArraySource(byte[] bytes, String mimeType)
ByteArraySource(ByteArrayDataSource dataSource)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description InputStream
getInputStream()
Reader
getReader()
-
Methods inherited from class javax.xml.transform.stream.StreamSource
getPublicId, getSystemId, setInputStream, setPublicId, setReader, setSystemId, setSystemId
-
-
-
-
Constructor Detail
-
ByteArraySource
public ByteArraySource(byte[] bytes)
-
ByteArraySource
public ByteArraySource(byte[] bytes, String mimeType)
-
ByteArraySource
public ByteArraySource(ByteArrayDataSource dataSource)
-
-
Method Detail
-
getInputStream
public InputStream getInputStream()
- Overrides:
getInputStream
in classStreamSource
-
getReader
public Reader getReader()
- Overrides:
getReader
in classStreamSource
-
-