public abstract class DapUtil extends Object
| Modifier and Type | Field and Description |
|---|---|
static BigInteger |
BIG_UMASK64 |
static int |
CHECKSUMSIZE |
static int |
CHUNK_ALL |
static int |
CHUNK_DATA |
static int |
CHUNK_END |
static int |
CHUNK_ERROR |
static int |
CHUNK_LITTLE_ENDIAN |
static String |
CRLF |
static int |
CRLFSIZE |
static String |
DIGESTER |
static String |
LF |
static ByteOrder |
NATIVE_ORDER |
static ByteOrder |
NETWORK_ORDER |
static Charset |
UTF8 |
| Constructor and Description |
|---|
DapUtil() |
| Modifier and Type | Method and Description |
|---|---|
static List<String> |
backslashSplit(String s,
char sep)
Split a string with respect to a separator
character and taking backslashes into consideration.
|
static String |
canonicalpath(String path,
boolean relative)
Convert path to:
1.
|
static boolean |
checkFixedSize(DapVariable var) |
static long |
dimProduct(List<DapDimension> dimset) |
static List<Slice> |
dimsetSlices(List<DapDimension> dimset)
Given a view, get the universal
View either from a DapDataset.
|
static byte[] |
extract(ByteBuffer buf)
Properly extract the byte contents of a ByteBuffer
|
static String |
fqnPrefix(String fqn) |
static String |
fqnSuffix(String fqn) |
static String[] |
getProtocols(String url) |
static List<DapVariable> |
getStructurePath(DapVariable var)
Given a dap variable, get the path from the
top-level variable to and including the given variable
such that all but the last element is a structure.
|
static boolean |
hasSequence(DapNode node) |
static boolean |
hasStrideOne(List<Slice> slices) |
static boolean |
isWhole(List<Slice> slices,
List<DapDimension> dimset)
Test a List
|
static String |
locateFile(String filename,
String abspath,
boolean wantdir)
Walk the specified subtree dir tree to try to locate file|dir named filename.
|
static String |
locateRelative(String relpath,
String abspath,
boolean wantdir)
Walk the specified dir tree to locate file specified by relative path.
|
static String |
nullify(String path)
Convert "" paths to null
|
static byte[] |
readbinaryfile(InputStream stream) |
static String |
readtextfile(InputStream stream) |
static long |
sliceProduct(List<Slice> slices) |
public static final BigInteger BIG_UMASK64
public static final Charset UTF8
public static final ByteOrder NETWORK_ORDER
public static final ByteOrder NATIVE_ORDER
public static final int CHUNK_DATA
public static final int CHUNK_END
public static final int CHUNK_ERROR
public static final int CHUNK_LITTLE_ENDIAN
public static final int CHUNK_ALL
public static final String LF
public static final String CRLF
public static final int CRLFSIZE
public static final int CHECKSUMSIZE
public static final String DIGESTER
public static List<String> backslashSplit(String s, char sep)
s - The string to splitsep - The character on which to splitpublic static boolean hasSequence(DapNode node)
public static String locateFile(String filename, String abspath, boolean wantdir)
filename - Name of the file|dir to locateabspath - Absolute path from which to start searchwantdir - True if we are looking for a directory,
false if we are looking for a filepublic static String locateRelative(String relpath, String abspath, boolean wantdir)
relpath - Name of the file|dir to locateabspath - Absolute path from which to start searchwantdir - True if we are looking for a directory,
false if we are looking for a filepublic static String canonicalpath(String path, boolean relative)
path - convert this pathpublic static boolean checkFixedSize(DapVariable var)
public static byte[] extract(ByteBuffer buf)
buf - The buffer whose content is to be extracted
as defined by the buffer limit.public static byte[] readbinaryfile(InputStream stream) throws IOException
IOExceptionpublic static String readtextfile(InputStream stream) throws IOException
IOExceptionpublic static List<DapVariable> getStructurePath(DapVariable var)
public static String nullify(String path)
path - public static long dimProduct(List<DapDimension> dimset)
public static List<Slice> dimsetSlices(List<DapDimension> dimset) throws DapException
DapExceptionpublic static boolean isWhole(List<Slice> slices, List<DapDimension> dimset)
slices - the set of slicesdimset - the list of DapDimensionCopyright © 1999–2014 UCAR/Unidata. All rights reserved.