org.exist.xmldb
Interface ExtendedResource

All Known Implementing Classes:
AbstractRemoteResource, LocalBinaryResource, RemoteBinaryResource, RemoteXMLResource

public interface ExtendedResource

An extension to BinaryResource interface, which adds the common methods needed by LocalBinaryResource and RemoteBinaryResource, so they can be streamlined.

Author:
jmfernandez

Method Summary
 void getContentIntoAFile(File localfile)
          It saves the resource to the local file given as input parameter.
 void getContentIntoAStream(OutputStream os)
          It saves the resource to the local stream given as input parameter.
 Object getExtendedContent()
          It returns an object representing the content, in the representation which needs less memory.
 InputStream getStreamContent()
          It returns an stream to the content, whichever it is its origin
 long getStreamLength()
          It returns the length of the content, whichever it is its origin
 

Method Detail

getExtendedContent

Object getExtendedContent()
                          throws XMLDBException
It returns an object representing the content, in the representation which needs less memory.

Throws:
XMLDBException

getStreamContent

InputStream getStreamContent()
                             throws XMLDBException
It returns an stream to the content, whichever it is its origin

Throws:
XMLDBException

getStreamLength

long getStreamLength()
                     throws XMLDBException
It returns the length of the content, whichever it is its origin

Throws:
XMLDBException

getContentIntoAFile

void getContentIntoAFile(File localfile)
                         throws XMLDBException
It saves the resource to the local file given as input parameter. Do NOT confuse with set content.

Throws:
XMLDBException

getContentIntoAStream

void getContentIntoAStream(OutputStream os)
                           throws XMLDBException
It saves the resource to the local stream given as input parameter. Do NOT confuse with set content.

Throws:
XMLDBException


Copyright (C) Wolfgang Meier. All rights reserved.