Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.any23.source
Interface DocumentSource

All Known Implementing Classes:
  ByteArrayDocumentSource, FileDocumentSource, HTTPDocumentSource, StringDocumentSource

    public interface DocumentSource

A source of input streams. Mostly intended for situations where opening of an input stream is to be delayed.

Author:
  Richard Cyganiak (richard@cyganiak.de)

Method Summary
`long` | `getContentLength()`
`String` | `getContentType()`
`String` | `getDocumentURI()`
`boolean` | `isLocal()` A value of `false` indicates that the document resides remotely, and that multiple successive accesses to it should be avoided by copying it to local storage.
`InputStream` | `openInputStream()` Returns the input stream for accessing the content of the document.

Method Detail

### openInputStream

    InputStream openInputStream()
                                throws IOException

  Returns the input stream for accessing the content of the document.

  Returns:
    not `null` input stream for accessing document data.
  Throws:
    `IOException`

### getContentType

    String getContentType()

  Returns:
    a string describing the content type of the provided document.

### getContentLength

    long getContentLength()

  Returns:
    the size of the content length in bytes.

### getDocumentURI

    String getDocumentURI()

  Returns:
    the actual, final, canonical URI if redirects occur.

### isLocal

    boolean isLocal()

  A value of `false` indicates that the document resides remotely, and that multiple successive accesses to it should be avoided by copying it to local storage. This can also be used for sources that do not support multiple calls to `openInputStream()`.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2010-2012 The Apache Software Foundation. All Rights Reserved.