ucar.nc2.stream
Class NcStream
java.lang.Object
ucar.nc2.stream.NcStream
public class NcStream
- extends Object
Defines the ncstream format, along with ncStream.proto.
To regenerate ncStreamProto.java from ncStream.proto:
cd c:/dev/tds4.2/thredds/cdm/src/main/java
protoc --proto_path=. --java_out=. ucar/nc2/stream/ncStream.proto
- See Also:
- "http://www.unidata.ucar.edu/software/netcdf-java/stream/NcStream.html",
"http://www.unidata.ucar.edu/software/netcdf-java/stream/NcstreamGrammer.html"
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MAGIC_START
public static final byte[] MAGIC_START
MAGIC_HEADER
public static final byte[] MAGIC_HEADER
MAGIC_DATA
public static final byte[] MAGIC_DATA
MAGIC_VDATA
public static final byte[] MAGIC_VDATA
MAGIC_VEND
public static final byte[] MAGIC_VEND
MAGIC_ERR
public static final byte[] MAGIC_ERR
MAGIC_END
public static final byte[] MAGIC_END
NcStream
public NcStream()
encodeErrorMessage
public static NcStreamProto.Error encodeErrorMessage(String message)
encodeSection
public static NcStreamProto.Section encodeSection(Section section)
encodeArrayStructure
public static long encodeArrayStructure(ArrayStructure as,
OutputStream os)
throws IOException
- Throws:
IOException
decodeArrayStructure
public static ArrayStructureBB decodeArrayStructure(StructureMembers sm,
int[] shape,
byte[] proto)
throws IOException
- Throws:
IOException
decodeStructureData
public static StructureData decodeStructureData(StructureMembers sm,
byte[] proto)
throws IOException
- Throws:
IOException
writeBytes
public static int writeBytes(OutputStream out,
byte[] b)
throws IOException
- Throws:
IOException
writeVInt
public static int writeVInt(OutputStream out,
int value)
throws IOException
- Throws:
IOException
writeVInt
public static int writeVInt(WritableByteChannel wbc,
int value)
throws IOException
- Throws:
IOException
readVInt
public static int readVInt(InputStream is)
throws IOException
- Throws:
IOException
readFully
public static int readFully(InputStream is,
byte[] b)
throws IOException
- Throws:
IOException
readAndTest
public static boolean readAndTest(InputStream is,
byte[] test)
throws IOException
- Throws:
IOException
decodeErrorMessage
public static String decodeErrorMessage(NcStreamProto.Error err)
decodeSection
public static Section decodeSection(NcStreamProto.Section proto)
encodeDataType
public static NcStreamProto.DataType encodeDataType(DataType dtype)
decodeDataType
public static DataType decodeDataType(NcStreamProto.DataType dtype)
Copyright © 1999-2011 UCAR/Unidata. All Rights Reserved.