Eclipse Platform
Release 3.2

org.eclipse.ui.console
Class IOConsoleInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by org.eclipse.ui.console.IOConsoleInputStream
All Implemented Interfaces:
java.io.Closeable

public class IOConsoleInputStream
extends java.io.InputStream

InputStream used to read input from an IOConsole. This stream will buffer input that it receives until it has been read.

Clients are not intended to instantiate this class directly, instead use IOConsole.getInputStream(). Clients are not intended to subclass this class.

Since:
3.1

Method Summary
 void appendData(java.lang.String text)
          Appends text to this input stream's buffer.
 int available()
           
 void close()
           
 Color getColor()
          Returns the color used to decorate input in the associated console
 int getFontStyle()
          Returns this stream's font style.
 int read()
           
 int read(byte[] b)
           
 int read(byte[] b, int off, int len)
           
 void setColor(Color newColor)
          Sets the color to used to decorate input in the associated console.
 void setFontStyle(int newFontStyle)
          Sets this stream's font style.
 
Methods inherited from class java.io.InputStream
mark, markSupported, reset, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

read

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

read

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

read

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

appendData

public void appendData(java.lang.String text)
Appends text to this input stream's buffer.

Parameters:
text - the text to append to the buffer.

getFontStyle

public int getFontStyle()
Returns this stream's font style.

Returns:
the font style used to decorate input in the associated console

setFontStyle

public void setFontStyle(int newFontStyle)
Sets this stream's font style.

Parameters:
newFontStyle - the font style to be used to decorate input in the associated console

setColor

public void setColor(Color newColor)
Sets the color to used to decorate input in the associated console.

Parameters:
newColor - the color to used to decorate input in the associated console.

getColor

public Color getColor()
Returns the color used to decorate input in the associated console

Returns:
the color used to decorate input in the associated console

available

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

close

public void close()
           throws java.io.IOException
Specified by:
close in interface java.io.Closeable
Overrides:
close in class java.io.InputStream
Throws:
java.io.IOException

Eclipse Platform
Release 3.2

Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp. and others 2000, 2006. All rights reserved.