java.lang.Object
java.io.OutputStream
net.botwithus.rs3.script.ScriptConsole
- All Implemented Interfaces:
Closeable,Flushable,AutoCloseable
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddLineToConsole(String line) voidaddLineToConsole(String line, boolean sameLine) voidclear()voidclose()voidflush()String[]intvoidinitializeLogFile(Path path, String name) booleanstatic voidPrints a message to the currently active script, if there is no active script this method does nothing.static voidPrints a message to the currently active script, if there is no active script this method does nothing.static voidPrints a message to the currently active script, if there is no active script this method does nothing.static voidPrints a message to the currently active script, if there is no active script this method does nothing.voidsetInputBuffer(String inputBuffer) voidsetLineIndex(int lineIndex) voidsetScrollToBottom(boolean scrollToBottom) voidwrite(int b) Methods inherited from class java.io.OutputStream
nullOutputStream, write, write
-
Field Details
-
MAX_CONSOLE_LINES
public static final int MAX_CONSOLE_LINES- See Also:
-
-
Constructor Details
-
ScriptConsole
public ScriptConsole()
-
-
Method Details
-
initializeLogFile
- Throws:
IOException
-
write
- Specified by:
writein classOutputStream- Throws:
IOException
-
addLineToConsole
-
addLineToConsole
-
isScrollToBottom
public boolean isScrollToBottom() -
setScrollToBottom
public void setScrollToBottom(boolean scrollToBottom) -
getInputBuffer
-
setInputBuffer
-
clear
public void clear() -
getConsoleLines
-
getLineIndex
public int getLineIndex() -
setLineIndex
public void setLineIndex(int lineIndex) -
println
Prints a message to the currently active script, if there is no active script this method does nothing.- Parameters:
value- The value to print
-
println
Prints a message to the currently active script, if there is no active script this method does nothing.- Parameters:
format- The format stringargs- The arguments to format
-
print
Prints a message to the currently active script, if there is no active script this method does nothing.- Parameters:
message- The message to print
-
print
Prints a message to the currently active script, if there is no active script this method does nothing.- Parameters:
format- The format stringargs- The arguments to format
-
flush
- Specified by:
flushin interfaceFlushable- Overrides:
flushin classOutputStream- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classOutputStream- Throws:
IOException
-