BEA Systems, Inc.

WebLogic Server 6.1 API Reference

weblogic.jdbc.informix4
Class SimpleInputStream

java.lang.Object
  |
  +--java.io.InputStream
        |
        +--weblogic.jdbc.informix4.SimpleInputStream

public class SimpleInputStream
extends java.io.InputStream

Author:
Copyright © 2001 BEA Systems, Inc. All Rights Reserved.

Field Summary
protected  java.lang.String encoding
           
protected  java.io.BufferedInputStream stream
           
 
Method Summary
 int available()
           
 void close()
          Puts the given character back into the stream.
 int getCounter()
          Return the value of the counter.
 boolean isClosed()
           
 int read()
          Reads a single byte from the stream, will return -1 if the EOF has been reached.
 int read(byte[] b, int ofs, int len)
          read until len bytes have been read into byte[] array will not return until array has had len bytes read into it starting at ofs
 int readByte()
          Reads a single byte from the stream.
 java.lang.String readCString()
          Reads a C string (NULL terminated Does conversion from JDK codeset to UNICODE, if encoding is specified
 java.lang.String readFixedString(int length)
          Reads a string whose size is given in the parameter, trailing zeros (if any) are removed.
 void readFullyInto(java.io.ByteArrayOutputStream inBytes, int len)
          Reads the untill the byte is encountered.
 int readLong()
          Read a short integer (2 bytes) Motorola style, from the stream
 java.lang.String readLongPascalString()
          Reads a string in Pascal format, 2 length byte followed by up to 32767 characters for the string.
 int readLsbInt()
          Reads a signed 32 bits integer from the stream.
 short readLsbShort()
          Read a short integer (2 bytes) Intel style, from the stream
 short readShort()
          Read a short integer (2 bytes) Motorola style, from the stream
 int readUnsignedByte()
          Reads a single unsigned byte from the stream.
 int readUnsignedLsbShort()
          Reads an unsigned short value from the stream, Intel style (the value is promoted to int).
 byte[] readUntill(byte theByte)
          Reads the untill the byte is encountered.
 void setCounter(int count)
          Set the value of the counter.
 void skipByte(int b)
          Skips a single byte.
 int skipBytes(int numBytes)
          Skips the given number of bytes or throws an exception if EOF is reached.
 
Methods inherited from class java.io.InputStream
mark, markSupported, read, reset, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

encoding

protected java.lang.String encoding

stream

protected java.io.BufferedInputStream stream
Method Detail

setCounter

public void setCounter(int count)
Set the value of the counter.

getCounter

public int getCounter()
Return the value of the counter.

read

public int read()
         throws java.io.IOException
Reads a single byte from the stream, will return -1 if the EOF has been reached.

Overrides:
read in class java.io.InputStream

read

public int read(byte[] b,
                int ofs,
                int len)
         throws java.io.IOException
read until len bytes have been read into byte[] array will not return until array has had len bytes read into it starting at ofs

Overrides:
read in class java.io.InputStream

available

public int available()
              throws java.io.IOException

Overrides:
available in class java.io.InputStream

close

public void close()
           throws java.io.IOException
Puts the given character back into the stream. A character can only be unread once.

Overrides:
close in class java.io.InputStream

isClosed

public boolean isClosed()
                 throws java.io.IOException

readByte

public int readByte()
             throws java.io.IOException
Reads a single byte from the stream.

readUnsignedByte

public int readUnsignedByte()
                     throws java.io.IOException
Reads a single unsigned byte from the stream.

readLsbShort

public short readLsbShort()
                   throws java.io.IOException
Read a short integer (2 bytes) Intel style, from the stream

readShort

public short readShort()
                throws java.io.IOException
Read a short integer (2 bytes) Motorola style, from the stream

readLong

public int readLong()
             throws java.io.IOException
Read a short integer (2 bytes) Motorola style, from the stream

readUnsignedLsbShort

public int readUnsignedLsbShort()
                         throws java.io.IOException
Reads an unsigned short value from the stream, Intel style (the value is promoted to int).

readLsbInt

public int readLsbInt()
               throws java.io.IOException
Reads a signed 32 bits integer from the stream.

readFixedString

public java.lang.String readFixedString(int length)
                                 throws java.io.IOException
Reads a string whose size is given in the parameter, trailing zeros (if any) are removed. TC: IMPORTANT NOTE ! routine does NO codeset conversion

readCString

public java.lang.String readCString()
                             throws java.io.IOException
Reads a C string (NULL terminated Does conversion from JDK codeset to UNICODE, if encoding is specified

readLongPascalString

public java.lang.String readLongPascalString()
                                      throws java.io.IOException
Reads a string in Pascal format, 2 length byte followed by up to 32767 characters for the string. TC: IMPORTANT NOTE ! routine does NO codeset conversion

readUntill

public byte[] readUntill(byte theByte)
                  throws java.io.IOException
Reads the untill the byte is encountered.

readFullyInto

public void readFullyInto(java.io.ByteArrayOutputStream inBytes,
                          int len)
                   throws java.io.IOException
Reads the untill the byte is encountered.

skipByte

public void skipByte(int b)
              throws java.io.IOException
Skips a single byte.

skipBytes

public int skipBytes(int numBytes)
              throws java.io.IOException
Skips the given number of bytes or throws an exception if EOF is reached.

Documentation is available at
http://download.oracle.com/docs/cd/E13222_01/wls/docs61

WebLogic classes and methods that do not appear in this reference are not public and are not supported.