com.pega.pegarules.pub.util
Class PRInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by com.pega.pegarules.pub.util.PRInputStream
All Implemented Interfaces:
java.io.Closeable

public class PRInputStream
extends java.io.InputStream

Implementation of InputStream that reads files from a JDBC data store.

Version:
$Revision: 2 $
Author:
dassu

Field Summary
static java.lang.String COPYRIGHT
           
static java.lang.String VERSION
           
 
Constructor Summary
PRInputStream(PRFile aFile)
           
PRInputStream(java.lang.String aFileSpec)
          Creates an instance of PRInputStream to read file contents from the underlying file storage.
 
Method Summary
 int available()
          Identical to BufferedInputStream.available()
 void close()
          Identical to BufferedInputStream.close()
 java.lang.String getURLSpecification()
          Returns the URL specification for the file (absolutePathName)
 void mark(int readlimit)
          Identical to BufferedInputStream.mark(int)
 boolean markSupported()
          Identical to BufferedInputStream.markSupported()
 int read()
          Identical to BufferedInputStream.read
 int read(byte[] b)
          Identical to BufferedInputStream.read(byte[])
 int read(byte[] b, int off, int len)
          Identical to BufferedInputStream.read(byte[], int, int)
 void reset()
          Identical to BufferedInputStream.reset()
 long skip(long n)
          Identical to BufferedInputStream.skip(long)
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COPYRIGHT

public static final java.lang.String COPYRIGHT
See Also:
Constant Field Values

VERSION

public static final java.lang.String VERSION
Constructor Detail

PRInputStream

public PRInputStream(java.lang.String aFileSpec)
              throws java.io.FileNotFoundException
Creates an instance of PRInputStream to read file contents from the underlying file storage.

Parameters:
aFileSpec - URL specification for the file
Throws:
java.io.FileNotFoundException - if the specified file does not exist in the underlying file store

PRInputStream

public PRInputStream(PRFile aFile)
              throws java.io.FileNotFoundException
Throws:
java.io.FileNotFoundException
Method Detail

getURLSpecification

public java.lang.String getURLSpecification()
Returns the URL specification for the file (absolutePathName)

Returns:
Returns the URL specification for the file (absolutePathName)

read

public int read()
         throws java.io.IOException
Identical to BufferedInputStream.read

Specified by:
read in class java.io.InputStream
Returns:
byte read
Throws:
java.io.IOException
See Also:
BufferedInputStream.read()

read

public int read(byte[] b)
         throws java.io.IOException
Identical to BufferedInputStream.read(byte[])

Overrides:
read in class java.io.InputStream
Parameters:
b -
Returns:
count of bytes read
Throws:
java.io.IOException
See Also:
FilterInputStream.read(byte[])

read

public int read(byte[] b,
                int off,
                int len)
         throws java.io.IOException
Identical to BufferedInputStream.read(byte[], int, int)

Overrides:
read in class java.io.InputStream
Parameters:
b -
off -
len -
Returns:
count of bytes read
Throws:
java.io.IOException
See Also:
BufferedInputStream.read(byte[], int, int)

skip

public long skip(long n)
          throws java.io.IOException
Identical to BufferedInputStream.skip(long)

Overrides:
skip in class java.io.InputStream
Parameters:
n -
Returns:
value
Throws:
java.io.IOException
See Also:
BufferedInputStream.skip(long)

close

public void close()
           throws java.io.IOException
Identical to BufferedInputStream.close()

Specified by:
close in interface java.io.Closeable
Overrides:
close in class java.io.InputStream
Throws:
java.io.IOException
See Also:
BufferedInputStream.close()

available

public int available()
              throws java.io.IOException
Identical to BufferedInputStream.available()

Overrides:
available in class java.io.InputStream
Returns:
number of bytes available without blocking
Throws:
java.io.IOException
See Also:
BufferedInputStream.available()

mark

public void mark(int readlimit)
Identical to BufferedInputStream.mark(int)

Overrides:
mark in class java.io.InputStream
Parameters:
readlimit -
See Also:
BufferedInputStream.mark(int)

markSupported

public boolean markSupported()
Identical to BufferedInputStream.markSupported()

Overrides:
markSupported in class java.io.InputStream
Returns:
true if mark() supported
See Also:
BufferedInputStream.markSupported()

reset

public void reset()
           throws java.io.IOException
Identical to BufferedInputStream.reset()

Overrides:
reset in class java.io.InputStream
Throws:
java.io.IOException
See Also:
BufferedInputStream.reset()


Copyright © 2012 Pegasystems Inc. All Rights Reserved.