com.starbase.util
Class TextInputStream

java.lang.Object
  |
  +--java.io.InputStream
        |
        +--com.starbase.util.TextInputStream

public class TextInputStream
extends java.io.InputStream

Converts from a Reader which is Unicode character based in to an input stream. If it finds that any chars don't fit in to an 8 bit value then it throws an exception.


Constructor Summary
TextInputStream(java.io.Reader source)
           
 
Method Summary
 int available()
           
 void close()
           
 boolean equals(java.lang.Object source)
          returns true if this object instance is equal to the source
 int hashCode()
          returns a unique hash for all instances of this type
 void mark(int readlimit)
           
 boolean markSupported()
           
 int read()
           
 int read(byte[] b, int off, int len)
          This method is overridden here because there is a bug int Sun's implementation from InputStream
 void reset()
           
 long skip(long n)
           
 
Methods inherited from class java.io.InputStream
read
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TextInputStream

public TextInputStream(java.io.Reader source)
Method Detail

read

public int read()
         throws java.io.IOException
Specified by:
read in class java.io.InputStream
java.io.IOException

close

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

skip

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

available

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

mark

public void mark(int readlimit)
Overrides:
mark in class java.io.InputStream

reset

public void reset()
           throws java.io.IOException
Overrides:
reset in class java.io.InputStream
java.io.IOException

markSupported

public boolean markSupported()
Overrides:
markSupported in class java.io.InputStream

read

public int read(byte[] b,
                int off,
                int len)
         throws java.io.IOException
This method is overridden here because there is a bug int Sun's implementation from InputStream

Overrides:
read in class java.io.InputStream
java.io.IOException

equals

public boolean equals(java.lang.Object source)
returns true if this object instance is equal to the source

Overrides:
equals in class java.lang.Object
Parameters:
source - Object the source to comapre with
Returns:
boolean true if this object is equal to the source

hashCode

public int hashCode()
returns a unique hash for all instances of this type

Overrides:
hashCode in class java.lang.Object
Returns:
int a unique hash for all instances of this type


StarTeam SDK 10.4, Build 36
Copyright © 2003-2008 Borland Software Corporation. All rights reserved.