Interpreter.Utils
Class OutputBuffer

java.lang.Object
  |
  +--java.io.Writer
        |
        +--java.io.BufferedWriter
              |
              +--Interpreter.Utils.OutputBuffer
Direct Known Subclasses:
NewOutputBuffer

public class OutputBuffer
extends java.io.BufferedWriter

Buffer di output che estende le funzionalitą del BufferedWriter.
Permette di utilizzare i comuni comandi print e println.


Fields inherited from class java.io.Writer
lock
 
Constructor Summary
OutputBuffer(java.io.OutputStream Out)
          Costruisce un nuovo OutputBuffer.
OutputBuffer(java.io.Writer w)
          Costruisce un nuovo OutputBuffer.
 
Method Summary
 void print(java.lang.String s)
          Scrive la stringa s sull'output buffer.
 void println(java.lang.String s)
          Scrive la stringa s sull'output buffer ed aggiunge un new line.
 
Methods inherited from class java.io.BufferedWriter
close, flush, newLine, write, write, write
 
Methods inherited from class java.io.Writer
write, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OutputBuffer

public OutputBuffer(java.io.Writer w)
Costruisce un nuovo OutputBuffer.
Parameters:
w - lo stream che deve essere bufferizzato.

OutputBuffer

public OutputBuffer(java.io.OutputStream Out)
Costruisce un nuovo OutputBuffer.
Parameters:
Out - lo stream che deve essere bufferizzato.
Method Detail

print

public void print(java.lang.String s)
           throws InterpreterException
Scrive la stringa s sull'output buffer.
Al termine fa un flush del buffer.
Parameters:
s - la stringa che deve essere scritta.
Throws:
InterpreterException - se la scrittura non ha successo

println

public void println(java.lang.String s)
             throws InterpreterException
Scrive la stringa s sull'output buffer ed aggiunge un new line.
Al termine fa un flush del buffer.
Parameters:
s - la stringa che deve essere scritta.
Throws:
InterpreterException - se la scrittura non ha successo


Codice realizzato da Francesco Geri & Marco Tamanti