org.apache.pdfbox.preflight.utils

## Class ByteArrayDataSource

- java.lang.Object
- - org.apache.pdfbox.preflight.utils.ByteArrayDataSource

All Implemented Interfaces:
  DataSource

    public class ByteArrayDataSource
    extends Object
    implements DataSource

### Constructor Summary

Constructors
Constructor and Description
`ByteArrayDataSource(InputStream is)`

### Method Summary

All Methods Instance Methods Concrete Methods
`String` `getContentType()`
`InputStream` `getInputStream()`
`String` `getName()`
`OutputStream` `getOutputStream()`
`void` `setName(String name)`
`void` `setType(String type)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### ByteArrayDataSource

    public ByteArrayDataSource(InputStream is)
                        throws IOException

Throws:
  `IOException`

### Method Detail

#### getContentType

    public String getContentType()

Specified by:
  `getContentType` in interface `DataSource`

#### setType

    public void setType(String type)

Parameters:
  `type` - the type to set

#### setName

    public void setName(String name)

Parameters:
  `name` - the name to set

#### getInputStream

    public InputStream getInputStream()
                               throws IOException

Specified by:
  `getInputStream` in interface `DataSource`
Throws:
  `IOException`

#### getName

    public String getName()

Specified by:
  `getName` in interface `DataSource`

#### getOutputStream

    public OutputStream getOutputStream()
                                 throws IOException

Specified by:
  `getOutputStream` in interface `DataSource`
Throws:
  `IOException`