org.exist.protocolhandler.embedded
Class EmbeddedUpload

java.lang.Object
  extended by org.exist.protocolhandler.embedded.EmbeddedUpload

public class EmbeddedUpload
extends Object

Read a document from a (input)stream and write it into database.

Author:
Dannes Wessels

Constructor Summary
EmbeddedUpload()
           
 
Method Summary
 void stream(XmldbURL xmldbURL, File tmp)
          Read document and write data to database.
 void stream(XmldbURL xmldbURL, File tmp, User user)
          Read document and write data to database.
 void stream(XmldbURL xmldbURL, InputStream is)
          Read document from stream and write data to database.
 void stream(XmldbURL xmldbURL, InputStream is, User user)
          Read document from stream and write data to database with specified user.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EmbeddedUpload

public EmbeddedUpload()
Method Detail

stream

public void stream(XmldbURL xmldbURL,
                   InputStream is)
            throws IOException
Read document from stream and write data to database.

Parameters:
xmldbURL - Location in database.
is - Stream containing document.
Throws:
IOException

stream

public void stream(XmldbURL xmldbURL,
                   InputStream is,
                   User user)
            throws IOException
Read document from stream and write data to database with specified user.

Parameters:
user - Effective user for operation. If NULL the user information is distilled from the URL.
xmldbURL - Location in database.
is - Stream containing document.
Throws:
IOException

stream

public void stream(XmldbURL xmldbURL,
                   File tmp)
            throws IOException
Read document and write data to database.

Parameters:
xmldbURL - Location in database.
tmp - Document that is inserted.
Throws:
IOException

stream

public void stream(XmldbURL xmldbURL,
                   File tmp,
                   User user)
            throws IOException
Read document and write data to database.

Parameters:
user - Effective user for operation. If NULL the user information is distilled from the URL.
xmldbURL - Location in database.
tmp - Document that is inserted.
Throws:
IOException


Copyright (C) Wolfgang Meier. All rights reserved.