Class SCIOutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- org.deepjava.runtime.mpc555.driver.SCIOutputStream
-
- All Implemented Interfaces:
Closeable,Flushable,AutoCloseable,Modified
public class SCIOutputStream extends OutputStream
Stream to write bytes to a SCI interface. Don't forget to initialize the interface before using this stream.
-
-
Constructor Summary
Constructors Constructor Description SCIOutputStream(SCI sci)Creates an output stream on a given SCI interface.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidwrite(byte[] buffer)Equivalent towrite(buffer, 0, buffer.length).voidwrite(byte[] buffer, int off, int count)Writescountbytes from the byte arraybufferstarting at positionoffsetto this stream.voidwrite(int b)Writes a single byte to this stream.-
Methods inherited from class java.io.OutputStream
close, flush
-
-
-
-
Constructor Detail
-
SCIOutputStream
public SCIOutputStream(SCI sci)
Creates an output stream on a given SCI interface.- Parameters:
sci- SCI number.
-
-
Method Detail
-
write
public void write(int b)
Writes a single byte to this stream. Only the least significant byte of the integerbis written to the stream.- Specified by:
writein classOutputStream- Parameters:
b- the byte to be written.
-
write
public void write(byte[] buffer)
Equivalent towrite(buffer, 0, buffer.length).- Overrides:
writein classOutputStream- Parameters:
buffer- the buffer to be written.
-
write
public void write(byte[] buffer, int off, int count)Writescountbytes from the byte arraybufferstarting at positionoffsetto this stream.- Overrides:
writein classOutputStream- Parameters:
buffer- the buffer to be written.off- the start position inbufferfrom where to get bytes.count- the number of bytes frombufferto write to this stream.
-
-