# Class ReferenceInputStream

java.lang.Object
java.io.InputStream
org.eclipse.osgi.storage.url.reference.ReferenceInputStream

All Implemented Interfaces:
  `Closeable, AutoCloseable, ContentProvider`

public class ReferenceInputStream extends InputStream implements ContentProvider
InputStream subclass which provides a reference (via File) to the data rather than allowing the input stream to be directly read.

## Nested Class Summary

### Nested classes/interfaces inherited from interface ContentProvider

`ContentProvider.Type`

## Constructor Summary

Constructors
Constructor
Description
`ReferenceInputStream(File reference)`

## Method Summary

Modifier and Type
Method
Description
`File`
`getContent()`
A file of the content, may be `null`
`File`
`getReference()`
`ContentProvider.Type`
`getType()`
The type of content
`int`
`read()`

### Methods inherited from class InputStream

`available, close, mark, markSupported, nullInputStream, read, read, readAllBytes, readNBytes, readNBytes, reset, skip, skipNBytes, transferTo`

### Methods inherited from class Object

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

## Constructor Details

### ReferenceInputStream

public ReferenceInputStream(File reference)

## Method Details

### read

public int read() throws IOException

Specified by:
  `read` in class `InputStream`
Throws:
  `IOException`

### getReference

public File getReference()

### getContent

public File getContent()
Description copied from interface: `ContentProvider`
A file of the content, may be `null`

Specified by:
  `getContent` in interface `ContentProvider`
Returns:
  the file, may be `null`

### getType

public ContentProvider.Type getType()
Description copied from interface: `ContentProvider`
The type of content

Specified by:
  `getType` in interface `ContentProvider`
Returns:
  the type of content