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,RandomAccessFileChannel
public interface OutputWriter
Interface for basic binary output writing functionality.
- Since:
- 1.16
- Author:
- Attila Kovacs
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic OutputWriterfrom(OutputStream o) Wraps an output stream with this interface.voidwrite(byte[] b, int from, int length) Writes up to the specified number of bytes from a buffer to the stream.voidwrite(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
-