Class FlinkUARTInputStream
- java.lang.Object
- 
- java.io.InputStream
- 
- org.deepjava.runtime.zynq7000.driver.UARTInputStream
- 
- org.deepjava.runtime.zynq7000.driver.FlinkUARTInputStream
 
 
 
- 
- All Implemented Interfaces:
- Closeable,- AutoCloseable,- Modified
 
 public class FlinkUARTInputStream extends UARTInputStream Input Stream to read bytes from a UART interface. Don't forget to initialize the UART before using this class.
- 
- 
Constructor SummaryConstructors Constructor Description FlinkUARTInputStream(FlinkUART uart)Creates an input stream on a given UART interface.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description intavailable()Returns the number of bytes available from the stream.intread()Reads one byte from the UART.intread(byte[] buffer)Reads the given number of bytes from the UART.intread(byte[] buffer, int off, int count)Reads the given number of bytes from the UART.- 
Methods inherited from class java.io.InputStreamclose, mark, markSupported, reset
 
- 
 
- 
- 
- 
Constructor Detail- 
FlinkUARTInputStreampublic FlinkUARTInputStream(FlinkUART uart) Creates an input stream on a given UART interface.- Parameters:
- uart- UART number.
 
 
- 
 - 
Method Detail- 
availablepublic int available() Returns the number of bytes available from the stream.- Overrides:
- availablein class- UARTInputStream
- Returns:
- number of bytes available.
 
 - 
readpublic int read() Reads one byte from the UART. A call of this method is not blocking!- Overrides:
- readin class- UARTInputStream
- Returns:
- byte read
 
 - 
readpublic int read(byte[] buffer) Reads the given number of bytes from the UART. A call of this method is not blocking!- Overrides:
- readin class- UARTInputStream
- Parameters:
- buffer- Byte array to write the received data.
- Returns:
- the number of bytes read.
 
 - 
readpublic int read(byte[] buffer, int off, int count)Reads the given number of bytes from the UART. A call of this method is not blocking!- Overrides:
- readin class- UARTInputStream
- Parameters:
- buffer- Byte array to write the received data.
- off- Offset in the array to start writing the data.
- count- Length (number of bytes) to read.
- Returns:
- the number of bytes read.
 
 
- 
 
-