public class LittleEndianByteOutputStream extends java.io.OutputStream implements ByteConstants
BXY_ID, NUFILE_ID, NUFX_ID, TIMEREC_DAY, TIMEREC_HOUR, TIMEREC_LENGTH, TIMEREC_MINUTE, TIMEREC_MONTH, TIMEREC_NULL, TIMEREC_SECOND, TIMEREC_WEEKDAY, TIMEREC_YEAR| Constructor and Description |
|---|
LittleEndianByteOutputStream(java.io.OutputStream outputStream)
Construct a LittleEndianByteOutputStream from an OutputStream.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Pass the close request to the wrapped stream.
|
void |
flush()
Pass the flush request to the wrapped stream.
|
long |
getCrcValue()
Get the current CRC-16 value.
|
long |
getTotalBytesWritten()
Answer with the total number of bytes written.
|
void |
resetCrc()
Reset the CRC-16 to $0000.
|
void |
write(int b)
Write a next byte.
|
void |
writeDate(java.util.Date date)
Write the Java Date object as a TimeRec.
|
void |
writeLong(long l)
Write a "Long".
|
void |
writeNuFileId()
Write the NuFile id to the LittleEndianByteOutputStream.
|
void |
writeNuFxId()
Write the NuFX id to the LittleEndianByteOutputStream.
|
void |
writeWord(int w)
Write a "Word".
|
public LittleEndianByteOutputStream(java.io.OutputStream outputStream)
public void write(int b)
throws java.io.IOException
write in class java.io.OutputStreamjava.io.IOExceptionpublic void writeNuFileId()
throws java.io.IOException
java.io.IOExceptionpublic void writeNuFxId()
throws java.io.IOException
java.io.IOExceptionpublic void writeWord(int w)
throws java.io.IOException
java.io.IOExceptionpublic void writeLong(long l)
throws java.io.IOException
java.io.IOExceptionpublic void writeDate(java.util.Date date)
throws java.io.IOException
java.io.IOExceptionhttp://www.nulib.com/library/nufx-addendum.htmpublic void resetCrc()
public long getCrcValue()
public long getTotalBytesWritten()
public void flush()
throws java.io.IOException
flush in interface java.io.Flushableflush in class java.io.OutputStreamjava.io.IOExceptionpublic void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class java.io.OutputStreamjava.io.IOException