Package nom.tam.util
Interface OutputWriter
- All Known Subinterfaces:
ArrayDataOutput
,FitsOutput
,RandomAccess
,RandomAccessFileIO
,ReadWriteAccess
- All Known Implementing Classes:
ArrayDataFile
,ArrayOutputStream
,BufferedDataOutputStream
,BufferedFile
,ByteArrayIO
,FitsFile
,FitsOutputStream
public interface OutputWriter
Interface for basic binary output writing functionality.
- Since:
- 1.16
- Author:
- Attila Kovacs
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic OutputWriter
from
(OutputStream o) Wraps an output stream with this interface.void
write
(byte[] b, int from, int length) Writes up to the specified number of bytes from a buffer to the stream.void
write
(int b) Writes a byte.
-
Method Details
-
write
Writes a byte. See the general contract ofDataOutputStream.write(int)
.- Parameters:
b
- the (unsigned) byte value to write.- Throws:
IOException
- if there was an underlying IO error- See Also:
-
write
Writes up to the specified number of bytes from a buffer to the stream. See the general contract ofDataOutputStream.write(byte[], int, int)
.- Parameters:
b
- the bufferfrom
- the starting buffer indexlength
- the number of bytes to write.- Throws:
IOException
- if there was an underlying IO error- See Also:
-
from
Wraps an output stream with this interface.- Parameters:
o
- any output stream- Returns:
- the stream wrapped to this interface
-