org.exist.validation.internal
Class ResourceInputStream

java.lang.Object
  extended byjava.io.InputStream
      extended byorg.exist.validation.internal.ResourceInputStream

public class ResourceInputStream
extends java.io.InputStream

Wrapper between ResourceThread that writes data into outputstream and the needed InputStream that is needed for the Validator. The glue is the circulair buffer BlockingOutputStream.

Author:
dizzzz
See Also:
InputStream, Validator, BlockingOutputStream

Constructor Summary
ResourceInputStream(BrokerPool brokerPool, XmldbURI docUri)
          Creates a new instance of ResourceInputStream.
 
Method Summary
 int available()
           
 void close()
           
 void flush()
           
 int read()
           
 int read(byte[] b)
           
 int read(byte[] b, int off, int len)
           
 void reset()
           
 long skip(long n)
           
 
Methods inherited from class java.io.InputStream
mark, markSupported
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourceInputStream

public ResourceInputStream(BrokerPool brokerPool,
                           XmldbURI docUri)
Creates a new instance of ResourceInputStream.

Parameters:
brokerPool - BrokerPool
docUri - XML resource that must be streamed.
Method Detail

read

public int read(byte[] b,
                int off,
                int len)
         throws java.io.IOException
Throws:
java.io.IOException

read

public int read(byte[] b)
         throws java.io.IOException
Throws:
java.io.IOException

skip

public long skip(long n)
          throws java.io.IOException
Throws:
java.io.IOException

reset

public void reset()
           throws java.io.IOException
Throws:
java.io.IOException

read

public int read()
         throws java.io.IOException
Throws:
java.io.IOException

close

public void close()
           throws java.io.IOException
Throws:
java.io.IOException

flush

public void flush()
           throws java.io.IOException
Throws:
java.io.IOException

available

public int available()
              throws java.io.IOException
Throws:
java.io.IOException


Copyright (C) Wolfgang Meier. All rights reserved.