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_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() |
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(String message)
public static NcStreamProto.Section encodeSection(Section section)
public static long encodeArrayStructure(ArrayStructure as, ByteOrder bo, OutputStream os) throws IOException
IOException
public static ArrayStructureBB decodeArrayStructure(StructureMembers sm, int[] shape, byte[] proto) throws IOException
IOException
public static StructureData decodeStructureData(StructureMembers sm, ByteOrder bo, byte[] proto) throws IOException
IOException
public static int writeBytes(OutputStream out, byte[] b) throws IOException
IOException
public static int writeVInt(OutputStream out, int value) throws IOException
IOException
public static int writeVInt(RandomAccessFile out, int value) throws IOException
IOException
public static int writeVInt(WritableByteChannel wbc, int value) throws IOException
IOException
public static int readVInt(InputStream is) throws IOException
IOException
public static int readVInt(RandomAccessFile raf) throws IOException
IOException
public static int readFully(InputStream is, byte[] b) throws IOException
IOException
public static boolean readAndTest(InputStream is, byte[] test) throws IOException
IOException
public static boolean readAndTest(RandomAccessFile raf, byte[] test) throws IOException
IOException
public static boolean test(Byte[] b, byte[] test) throws IOException
IOException
public static 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)
Copyright © 1999–2015 UCAR/Unidata. All rights reserved.