***  This API provides Binary Compatibility only, not Source Compatibility  ***

com.sas.iom
Class InputStream

java.lang.Object
  |
  +--java.io.InputStream
        |
        +--com.sas.iom.InputStream

public class InputStream
extends InputStream

Provides the capability to read input from an IOM InputStream.

Since:
1.0

Constructor Summary
InputStream(com.sas.iom.SASCache.ICacheReader iCacheReader, com.sas.iom.SASCache.ICacheService iCacheService)
           
 
Method Summary
 int available()
           
 void close()
           
 byte[] getData()
          Get the data of this InputStream.
 byte[] getData(boolean closeStream)
          Get the data of this InputStream.
 String getDataAsString()
          Get the data of this InputStream.
 String getDataAsString(String encoding, boolean closeStream)
          Get the data of this InputStream.
 InputStreamHeaderInterface getHeader()
          Get the header interface for this InputStream.
 int read()
           
 int read(byte[] b)
           
 int read(byte[] b, int off, int len)
           
 long skip(long n)
           
 
Methods inherited from class java.io.InputStream
mark, markSupported, reset
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InputStream

public InputStream(com.sas.iom.SASCache.ICacheReader iCacheReader,
                   com.sas.iom.SASCache.ICacheService iCacheService)
Method Detail

getHeader

public InputStreamHeaderInterface getHeader()
Get the header interface for this InputStream.
Returns:
header InputStream header.
See Also:
InputStreamHeaderInterface

getData

public byte[] getData()
               throws IOException
Get the data of this InputStream.

This convenience method returns the entire contents of the InputStream as a byte array.

The InputStream will be automatically closed when all the data has been read.

Returns:
data associated with this InputStream.

getData

public byte[] getData(boolean closeStream)
               throws IOException
Get the data of this InputStream.

This convenience method returns the entire contents of the InputStream as a byte array.

Parameters:
closeStream - set to true to cause the stream to be closed; otherwise false.
Returns:
data associated with this InputStream.

getDataAsString

public String getDataAsString()
                       throws IOException
Get the data of this InputStream.

This convenience method returns the entire contents of the InputStream as a String.

The default charset is used.

The InputStream will be automatically closed when all the data has been read.

Returns:
data associated with this InputStream.

getDataAsString

public String getDataAsString(String encoding,
                              boolean closeStream)
                       throws IOException
Get the data of this InputStream.

This convenience method returns the entire contents of the InputStream as a String.

Parameters:
encoding - Name of a supported charset.
closeStream - set to true to cause the stream to be closed; otherwise false.
Returns:
data associated with this InputStream.

skip

public long skip(long n)
          throws IOException
Overrides:
skip in class InputStream

read

public int read()
         throws IOException
Overrides:
read in class InputStream

read

public int read(byte[] b)
         throws IOException
Overrides:
read in class InputStream

read

public int read(byte[] b,
                int off,
                int len)
         throws IOException
Overrides:
read in class InputStream

available

public int available()
              throws IOException
Overrides:
available in class InputStream

close

public void close()
           throws IOException
Overrides:
close in class InputStream

***  This API provides Binary Compatibility only, not Source Compatibility  ***




Copyright © 2006 SAS Institute Inc. All Rights Reserved.
javadoc generated Fri, 10 Feb 2006 17:28:51