Class UARTOutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- org.deepjava.runtime.mpc5200.driver.UARTOutputStream
-
- All Implemented Interfaces:
Closeable
,Flushable
,AutoCloseable
,Modified
public class UARTOutputStream extends OutputStream
Stream to write bytes to a UART interface. Don't forget to initialize the interface before using this stream.
-
-
Constructor Summary
Constructors Constructor Description UARTOutputStream(int uart)
Creates an output stream on a given UART interface.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
write(byte[] buffer)
Equivalent towrite(buffer, 0, buffer.length)
.void
write(byte[] buffer, int off, int count)
Writescount
bytes from the byte arraybuffer
starting at positionoffset
to this stream.void
write(int b)
Writes a single byte to this stream.-
Methods inherited from class java.io.OutputStream
close, flush
-
-
-
-
Field Detail
-
pPSC1
public static final int pPSC1
- See Also:
- Constant Field Values
-
pPSC2
public static final int pPSC2
- See Also:
- Constant Field Values
-
pPSC3
public static final int pPSC3
- See Also:
- Constant Field Values
-
pPSC4
public static final int pPSC4
- See Also:
- Constant Field Values
-
pPSC5
public static final int pPSC5
- See Also:
- Constant Field Values
-
pPSC6
public static final int pPSC6
- See Also:
- Constant Field Values
-
-
Method Detail
-
write
public void write(int b)
Writes a single byte to this stream. Only the least significant byte of the integerb
is written to the stream.- Specified by:
write
in classOutputStream
- Parameters:
b
- the byte to be written.
-
write
public void write(byte[] buffer)
Equivalent towrite(buffer, 0, buffer.length)
.- Overrides:
write
in classOutputStream
- Parameters:
buffer
- the buffer to be written.
-
write
public void write(byte[] buffer, int off, int count)
Writescount
bytes from the byte arraybuffer
starting at positionoffset
to this stream.- Overrides:
write
in classOutputStream
- Parameters:
buffer
- the buffer to be written.off
- the start position inbuffer
from where to get bytes.count
- the number of bytes frombuffer
to write to this stream.
-
-