public class Sequence extends Structure
Variable.CachedefaultBufferSize, isSubset, log, memberHash, membersattributes, cache, dataType, debugCaching, defaultCoordsSizeToCache, defaultSizeToCache, dimensions, elementSize, hashCode, isMetadata, isVariableLength, ncfile, proxyReader, shape, shapeAsSection, sizeToCache, spiObject| Constructor and Description |
|---|
Sequence(NetcdfFile ncfile,
Group group,
Structure parent,
String shortName) |
| Modifier and Type | Method and Description |
|---|---|
StructureDataIterator |
getStructureIterator(int bufferSize)
Get an efficient iterator over all the data in the Structure.
|
Array |
read(int[] origin,
int[] shape)
UnsupportedOperation
|
Array |
read(List<Range> ranges)
UnsupportedOperation
|
Array |
read(Section section)
UnsupportedOperation
|
Array |
read(String sectionSpec)
UnsupportedOperation
|
StructureData |
readStructure()
UnsupportedOperation
|
StructureData |
readStructure(int index)
UnsupportedOperation
|
ArrayStructure |
readStructure(int start,
int count)
UnsupportedOperation
|
Variable |
section(Section subsection)
UnsupportedOperation
|
Variable |
slice(int dim,
int value)
UnsupportedOperation
|
addMemberVariable, calcElementSize, calcStructureSize, copy, findVariable, getElementSize, getNameAndAttributes, getNumberOfMemberVariables, getStructureIterator, getVariableNames, getVariables, isCaching, isSubset, makeStructureMembers, removeMemberVariable, replaceMemberVariable, select, select, setCaching, setImmutable, setMemberVariables, setParentGroup, writeCDL_read, _read, addAttribute, clone, compareTo, createNewCache, equals, extraInfo, findAttribute, findAttributeIgnoreCase, findDimensionIndex, getAttributes, getDAPName, getDAPName, getDataType, getDescription, getDimension, getDimensions, getDimensionsAll, getDimensionsString, getEnumTypedef, getNameAndDimensions, getNameAndDimensions, getNameAndDimensions, getNameAndDimensions, getNameAndDimensions, getNameAndDimensions, getParentGroup, getProxyReader, getRanges, getRank, getScalarData, getShape, getShape, getShapeAll, getShapeAsSection, getSize, getSizeToCache, getSPobject, getUnitsString, hasCachedData, hashCode, invalidateCache, isCoordinateVariable, isImmutable, isMetadata, isScalar, isUnknownLength, isUnlimited, isUnsigned, isVariableLength, lookupEnumString, read, readScalarByte, readScalarDouble, readScalarFloat, readScalarInt, readScalarLong, readScalarShort, readScalarString, readToByteChannel, readToStream, reallyRead, reallyRead, remove, removeAttribute, removeAttributeIgnoreCase, resetDimensions, resetShape, section, setCachedData, setCachedData, setDataType, setDimension, setDimensions, setDimensions, setDimensionsAnonymous, setElementSize, setEnumTypedef, setIsScalar, setName, setProxyReader, setSizeToCache, setSPobject, setValues, setValues, toString, toStringDebug, writeCDLgetDODSName, getFullName, getFullNameEscaped, getGroup, getImmutable, getName, getParentStructure, getShortName, getSort, isMemberOfStructure, setDODSName, setImmutable, setParentStructure, setShortName, setSortfinalize, getClass, notify, notifyAll, wait, wait, waitgetFullName, getFullNameEscaped, getParentStructure, getShortName, isMemberOfStructuregetNamepublic Sequence(NetcdfFile ncfile, Group group, Structure parent, String shortName)
public StructureDataIterator getStructureIterator(int bufferSize) throws IOException
StructureExample:
StructureDataIterator ii = structVariable.getStructureIterator(100 * 1000);
while (ii.hasNext()) {
StructureData sdata = ii.next();
}
getStructureIterator in class StructurebufferSize - size in bytes to buffer, set < 0 to use default sizeIOException - on read errorpublic Array read(int[] origin, int[] shape) throws IOException, InvalidRangeException
read in interface VariableIFread in class Variableorigin - int array specifying the starting index. If null, assume all zeroes.shape - int array specifying the extents in each dimension.
This becomes the shape of the returned Array.UnsupportedOperationExceptionIOExceptionInvalidRangeExceptionpublic Array read(String sectionSpec) throws IOException, InvalidRangeException
read in interface VariableIFread in class VariablesectionSpec - specification string, eg "1:2,10,:,1:100:10". May optionally have ().UnsupportedOperationExceptionIOExceptionInvalidRangeExceptionfor sectionSpec syntaxpublic Array read(List<Range> ranges) throws IOException, InvalidRangeException
read in class Variableranges - list of Range specifying the section of data to read.UnsupportedOperationExceptionIOException - if errorInvalidRangeException - if ranges is invalidVariable.read(Section)public Array read(Section section) throws IOException, InvalidRangeException
read in interface VariableIFread in class Variablesection - list of Range specifying the section of data to read.
Must be null or same rank as variable.
If list is null, assume all data.
Each Range corresponds to a Dimension. If the Range object is null, it means use the entire dimension.UnsupportedOperationExceptionIOException - if errorInvalidRangeException - if section is invalidpublic StructureData readStructure() throws IOException
readStructure in class StructureUnsupportedOperationExceptionIOException - on read errorpublic StructureData readStructure(int index) throws IOException, InvalidRangeException
readStructure in class Structureindex - index into 1D arrayUnsupportedOperationExceptionIOException - on read errorInvalidRangeException - if index out of rangepublic ArrayStructure readStructure(int start, int count) throws IOException, InvalidRangeException
readStructure in class Structurestart - start at this indexcount - return this many StructureDataUnsupportedOperationExceptionIOException - on read errorInvalidRangeException - if start, count out of rangepublic Variable slice(int dim, int value) throws InvalidRangeException
slice in class Variabledim - which dimension to fixvalue - at what index valueUnsupportedOperationExceptionInvalidRangeException - if dimension or value is illegalpublic Variable section(Section subsection) throws InvalidRangeException
section in class Variablesubsection - Section of this variable.
Each Range in the section corresponds to a Dimension, and specifies the section of data to read in that Dimension.
A Range object may be null, which means use the entire dimension.UnsupportedOperationExceptionInvalidRangeException - if section not compatible with shapeCopyright © 1999-2013 UCAR/Unidata. All Rights Reserved.