com.sun.jersey.core.impl.provider.entity
Class DataSourceProvider.ByteArrayDataSource
java.lang.Object
com.sun.jersey.core.impl.provider.entity.DataSourceProvider.ByteArrayDataSource
- All Implemented Interfaces:
- javax.activation.DataSource
- Enclosing class:
- DataSourceProvider
public static class DataSourceProvider.ByteArrayDataSource
- extends java.lang.Object
- implements javax.activation.DataSource
Modified from javax.mail.util.ByteArrayDataSource
A DataSource backed by a byte array. The byte array may be
passed in directly, or may be initialized from an InputStream
or a String.
- Since:
- JavaMail 1.4
- Author:
- John Mani, Bill Shannon, Max Spivak
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DataSourceProvider.ByteArrayDataSource
public DataSourceProvider.ByteArrayDataSource(java.io.InputStream is,
java.lang.String type)
throws java.io.IOException
- Throws:
java.io.IOException
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
setName
public void setName(java.lang.String name)
Copyright © 2011 Sun Microsystems, Inc. All Rights Reserved.