public class NcStream
extends java.lang.Object
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
Modifier and Type | Field and Description |
---|---|
static byte[] |
MAGIC_DATA |
static byte[] |
MAGIC_END |
static byte[] |
MAGIC_ERR |
static byte[] |
MAGIC_HEADER |
static byte[] |
MAGIC_START |
static byte[] |
MAGIC_VDATA |
static byte[] |
MAGIC_VEND |
Constructor and Description |
---|
NcStream() |
Modifier and Type | Method and Description |
---|---|
static ArrayStructureBB |
decodeArrayStructure(StructureMembers sm,
int[] shape,
byte[] proto) |
static DataType |
decodeDataType(NcStreamProto.DataType dtype) |
static java.lang.String |
decodeErrorMessage(NcStreamProto.Error err) |
static Section |
decodeSection(NcStreamProto.Section proto) |
static StructureData |
decodeStructureData(StructureMembers sm,
java.nio.ByteOrder bo,
byte[] proto) |
static long |
encodeArrayStructure(ArrayStructure as,
java.nio.ByteOrder bo,
java.io.OutputStream os) |
static NcStreamProto.DataType |
encodeDataType(DataType dtype) |
static NcStreamProto.Error |
encodeErrorMessage(java.lang.String message) |
static NcStreamProto.Section |
encodeSection(Section section) |
static boolean |
readAndTest(java.io.InputStream is,
byte[] test) |
static boolean |
readAndTest(RandomAccessFile raf,
byte[] test) |
static int |
readFully(java.io.InputStream is,
byte[] b) |
static int |
readVInt(java.io.InputStream is) |
static int |
readVInt(RandomAccessFile raf) |
static boolean |
test(java.lang.Byte[] b,
byte[] test) |
static int |
writeBytes(java.io.OutputStream out,
byte[] b) |
static int |
writeVInt(java.io.OutputStream out,
int value) |
static int |
writeVInt(RandomAccessFile out,
int value) |
static int |
writeVInt(java.nio.channels.WritableByteChannel wbc,
int value) |
public static final byte[] MAGIC_START
public static final byte[] MAGIC_HEADER
public static final byte[] MAGIC_DATA
public static final byte[] MAGIC_VDATA
public static final byte[] MAGIC_VEND
public static final byte[] MAGIC_ERR
public static final byte[] MAGIC_END
public static NcStreamProto.Error encodeErrorMessage(java.lang.String message)
public static NcStreamProto.Section encodeSection(Section section)
public static long encodeArrayStructure(ArrayStructure as, java.nio.ByteOrder bo, java.io.OutputStream os) throws java.io.IOException
java.io.IOException
public static ArrayStructureBB decodeArrayStructure(StructureMembers sm, int[] shape, byte[] proto) throws java.io.IOException
java.io.IOException
public static StructureData decodeStructureData(StructureMembers sm, java.nio.ByteOrder bo, byte[] proto) throws java.io.IOException
java.io.IOException
public static int writeBytes(java.io.OutputStream out, byte[] b) throws java.io.IOException
java.io.IOException
public static int writeVInt(java.io.OutputStream out, int value) throws java.io.IOException
java.io.IOException
public static int writeVInt(RandomAccessFile out, int value) throws java.io.IOException
java.io.IOException
public static int writeVInt(java.nio.channels.WritableByteChannel wbc, int value) throws java.io.IOException
java.io.IOException
public static int readVInt(java.io.InputStream is) throws java.io.IOException
java.io.IOException
public static int readVInt(RandomAccessFile raf) throws java.io.IOException
java.io.IOException
public static int readFully(java.io.InputStream is, byte[] b) throws java.io.IOException
java.io.IOException
public static boolean readAndTest(java.io.InputStream is, byte[] test) throws java.io.IOException
java.io.IOException
public static boolean readAndTest(RandomAccessFile raf, byte[] test) throws java.io.IOException
java.io.IOException
public static boolean test(java.lang.Byte[] b, byte[] test) throws java.io.IOException
java.io.IOException
public static java.lang.String decodeErrorMessage(NcStreamProto.Error err)
public static Section decodeSection(NcStreamProto.Section proto)
public static NcStreamProto.DataType encodeDataType(DataType dtype)
public static DataType decodeDataType(NcStreamProto.DataType dtype)