gov.nasa.gsfc.drl.rtstps.core.output.hdf5
Class UserBlockReader
java.lang.Object
gov.nasa.gsfc.drl.rtstps.core.output.hdf5.UserBlockReader
public class UserBlockReader
- extends java.lang.Object
Constructor Summary |
UserBlockReader(java.lang.String filename,
int userBlockSize)
|
Method Summary |
void |
close()
|
byte[] |
readBytes()
Get the UserBlock data and return it in a byte[] array. |
java.lang.String |
readString()
Get the UserBlock data and return it as a Java String. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
hdfFile
private java.io.File hdfFile
in
private java.io.RandomAccessFile in
userBlockSize
private int userBlockSize
userBlockBytes
private byte[] userBlockBytes
UserBlockReader
public UserBlockReader(java.lang.String filename,
int userBlockSize)
throws RtStpsException
- Throws:
RtStpsException
readBytes
public byte[] readBytes()
throws RtStpsException
- Get the UserBlock data and return it in a byte[] array. This is likely to include zeros at the end
which are not part of the real ASCII data values...
- Returns:
- a byte[] of the entire user block
- Throws:
RtStpsException
- wrapped IOException
readString
public java.lang.String readString()
throws RtStpsException
- Get the UserBlock data and return it as a Java String. Any zeros at the end are trimmed off.
- Returns:
- a XML as a String
- Throws:
RtStpsException
- wrapped IOException
close
public void close()
throws RtStpsException
- Throws:
RtStpsException