public class NcStream extends 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_DATA2 |
static byte[] |
MAGIC_DATACOV |
static byte[] |
MAGIC_END |
static byte[] |
MAGIC_ERR |
static byte[] |
MAGIC_HEADER |
static byte[] |
MAGIC_HEADERCOV |
static byte[] |
MAGIC_START |
static byte[] |
MAGIC_VDATA |
static byte[] |
MAGIC_VEND |
static int |
ncstream_data_version |
| Constructor and Description |
|---|
NcStream() |
public static final byte[] MAGIC_START
public static final byte[] MAGIC_HEADER
public static final byte[] MAGIC_DATA
public static final byte[] MAGIC_DATA2
public static final byte[] MAGIC_VDATA
public static final byte[] MAGIC_VEND
public static final byte[] MAGIC_HEADERCOV
public static final byte[] MAGIC_DATACOV
public static final byte[] MAGIC_ERR
public static final byte[] MAGIC_END
public static final int ncstream_data_version
public static NcStreamProto.Attribute.Builder encodeAtt(Attribute att)
public static NcStreamProto.Error encodeErrorMessage(String message)
public static NcStreamProto.Data encodeDataProto(String varname, DataType datatype, Section section, boolean deflate, int uncompressedLength)
public static NcStreamProto.Section encodeSection(Section section)
public static int writeBytes(OutputStream out, byte[] b) throws IOException
IOExceptionpublic static int writeVInt(OutputStream out, int value) throws IOException
IOExceptionpublic static int writeVInt(RandomAccessFile out, int value) throws IOException
IOExceptionpublic static int writeVInt(WritableByteChannel wbc, int value) throws IOException
IOExceptionpublic static int writeVLong(OutputStream out, long i) throws IOException
IOExceptionpublic static int readVInt(InputStream is) throws IOException
IOExceptionpublic static int readVInt(RandomAccessFile raf) throws IOException
IOExceptionpublic static int readFully(InputStream is, byte[] b) throws IOException
IOExceptionpublic static boolean readAndTest(InputStream is, byte[] test) throws IOException
IOExceptionpublic static boolean readAndTest(RandomAccessFile raf, byte[] test) throws IOException
IOExceptionpublic static boolean test(byte[] b,
byte[] test)
public static String decodeErrorMessage(NcStreamProto.Error err)
public static Attribute decodeAtt(NcStreamProto.Attribute attp)
@Nonnull public static Section decodeSection(NcStreamProto.Section proto)
public static NcStreamProto.DataType convertDataType(DataType dtype)
public static DataType convertDataType(NcStreamProto.DataType dtype)
public static long encodeArrayStructure(ArrayStructure as, ByteOrder bo, OutputStream os) throws IOException
IOExceptionpublic static ArrayStructureBB decodeArrayStructure(StructureMembers sm, int[] shape, byte[] proto) throws IOException
IOExceptionpublic static StructureData decodeStructureData(StructureMembers sm, ByteOrder bo, byte[] proto) throws IOException
IOException