Package org.eclipse.ui.console
Class IOConsoleInputStream
- java.lang.Object
-
- java.io.InputStream
-
- org.eclipse.ui.console.IOConsoleInputStream
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable
public class IOConsoleInputStream extends java.io.InputStreamInputStream used to read input from anIOConsole. This stream will buffer input that it receives until it has been read. An input stream is available from itsIOConsole.- Since:
- 3.1
- Restriction:
- This class is not intended to be subclassed by clients.
- Restriction:
- This class is not intended to be instantiated by clients.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidappendData(java.lang.String text)Appends text to this input stream's buffer.intavailable()voidclose()ColorgetColor()Returns the color used to decorate input in the associated consoleintgetFontStyle()Returns this stream's font style.intread()intread(byte[] b)intread(byte[] b, int off, int len)voidsetColor(Color newColor)Sets the color to used to decorate input in the associated console.voidsetFontStyle(int newFontStyle)Sets this stream's font style.
-
-
-
Method Detail
-
read
public int read(byte[] b, int off, int len) throws java.io.IOException- Overrides:
readin classjava.io.InputStream- Throws:
java.io.IOException
-
read
public int read(byte[] b) throws java.io.IOException- Overrides:
readin classjava.io.InputStream- Throws:
java.io.IOException
-
read
public int read() throws java.io.IOException- Specified by:
readin classjava.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:
availablein classjava.io.InputStream- Throws:
java.io.IOException
-
close
public void close() throws java.io.IOException- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Overrides:
closein classjava.io.InputStream- Throws:
java.io.IOException
-
-