org.springframework.oxm.jaxb
Class Jaxb2Marshaller.ByteArrayDataSource

java.lang.Object
  extended by org.springframework.oxm.jaxb.Jaxb2Marshaller.ByteArrayDataSource
All Implemented Interfaces:
javax.activation.DataSource
Enclosing class:
Jaxb2Marshaller

private static class Jaxb2Marshaller.ByteArrayDataSource
extends java.lang.Object
implements javax.activation.DataSource

DataSource that wraps around a byte array.


Field Summary
private  java.lang.String contentType
           
private  byte[] data
           
private  int length
           
private  int offset
           
 
Constructor Summary
private Jaxb2Marshaller.ByteArrayDataSource(java.lang.String contentType, byte[] data, int offset, int length)
           
 
Method Summary
 java.lang.String getContentType()
           
 java.io.InputStream getInputStream()
           
 java.lang.String getName()
           
 java.io.OutputStream getOutputStream()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

data

private byte[] data

contentType

private java.lang.String contentType

offset

private int offset

length

private int length
Constructor Detail

Jaxb2Marshaller.ByteArrayDataSource

private Jaxb2Marshaller.ByteArrayDataSource(java.lang.String contentType,
                                            byte[] data,
                                            int offset,
                                            int length)
Method Detail

getInputStream

public java.io.InputStream getInputStream()
                                   throws java.io.IOException
Specified by:
getInputStream in interface javax.activation.DataSource
Throws:
java.io.IOException

getOutputStream

public java.io.OutputStream getOutputStream()
                                     throws java.io.IOException
Specified by:
getOutputStream in interface javax.activation.DataSource
Throws:
java.io.IOException

getContentType

public java.lang.String getContentType()
Specified by:
getContentType in interface javax.activation.DataSource

getName

public java.lang.String getName()
Specified by:
getName in interface javax.activation.DataSource