com.dalsemi.comm
Class LCDOutputStream
java.lang.Object
|
+--java.io.OutputStream
|
+--com.dalsemi.comm.LCDOutputStream
- public class LCDOutputStream
- extends java.io.OutputStream
A LCD output stream is an output stream for writing data to a LCD Display.
This class can be used for direct writting to the LCD display on the TINI
developers station. It has been tested with LCDs that use the Samsung
KS0066U and KS0070B segment drivers. Using this stream, you can create
a PrintStream and do println()s to the display. Each println will show
up as the next available line on the display.
|
Constructor Summary |
LCDOutputStream(LCDPort lcd)
Creates a new data output stream to write data to the LCD port. |
|
Method Summary |
void |
close()
Closes this output stream and releases any system resources
associated with this stream. |
void |
write(byte[] barr,
int offset,
int len)
Displays the array on the LCD display. |
void |
write(int ch)
Writes the given character to the LCD display. |
| Methods inherited from class java.io.OutputStream |
flush,
write |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
LCDOutputStream
public LCDOutputStream(LCDPort lcd)
- Creates a new data output stream to write data to the LCD port.
- Parameters:
lcd - the LCD port to use for communications.
write
public void write(int ch)
throws java.io.IOException
- Writes the given character to the LCD display. This method blocks until
the byte has actually been sent.
- Parameters:
ch - the byte to send.- Throws:
- java.io.IOException -
- Overrides:
- write in class java.io.OutputStream
write
public void write(byte[] barr,
int offset,
int len)
throws java.io.IOException
- Displays the array on the LCD display. This method blocks until all bytes
have been sent.
- Parameters:
barr - the array to send.offset - the offset into the array to begin sending.len - the number of bytes to send.- Throws:
- java.io.IOException -
- Overrides:
- write in class java.io.OutputStream
close
public void close()
throws java.io.IOException
- Closes this output stream and releases any system resources
associated with this stream. Calls the underlying LCDPort close method.
- Throws:
- java.io.IOException - if an I/O error occurs.
- Overrides:
- close in class java.io.OutputStream