Package rasj
Class RasMArrayShort
- java.lang.Object
-
- rasj.odmg.RasObject
-
- rasj.RasGMArray
-
- rasj.RasMArrayShort
-
- All Implemented Interfaces:
RasGlobalDefs
public class RasMArrayShort extends RasGMArray
PURPOSE: This class represents a MArray with base type short.
-
-
Field Summary
-
Fields inherited from class rasj.RasGMArray
currentCell, currentFormat, data, dataSize, domain, objectData, storageLayout, typeLength
-
Fields inherited from class rasj.odmg.RasObject
objectName
-
Fields inherited from interface rasj.global.RasGlobalDefs
ACC_DEN_CAPABILITY_WRONG, ACC_DEN_INC_LOGIN, ACC_DEN_NO_PERMISSION, BASE_DBS_ERROR, CREATED, DATABASE_NOT_DEFINED, DB_CONN_FAILED, DB_NOT_OPEN, DELETED, DIMENSION_MISMATCH, FAST_PRE_SCALE_FACTORS, FAST_PRE_SCALE_SUFFIXES, GETFREESERVER_WAIT_INCREMENT, GETFREESERVER_WAIT_INITIAL, GUESTIDENT_DEFAULT, ILLEGAL_ULONG_VALUE, ILLEGAL_USHORT_VALUE, INDEX_OUT_OF_BOUNDS, INTERNAL_CLIENT_ERROR, INTERNAL_DL_PARSE_EXCEPTION, INVALID_OBJECT_NAME_ERROR, KEYWORD_ATYPE, KEYWORD_BTYPE, KEYWORD_CLASS, KEYWORD_CODE, KEYWORD_COLNO, KEYWORD_DIM1, KEYWORD_DIM2, KEYWORD_ERRNO, KEYWORD_HIGH, KEYWORD_INDEX, KEYWORD_INVNAME, KEYWORD_LINENO, KEYWORD_LOW, KEYWORD_METHOD, KEYWORD_TAB, KEYWORD_TOKEN, KEYWORD_TYPE, KEYWORD_URL, KEYWORD_VAL, MANAGER_BUSY, MANAGER_CONN_FAILED, MAX_GETFREESERVER_ATTEMPTS, MODIFIED, NO_ACTIVE_SERVERS, NO_STATUS, NUM_FAST_PRE_SCALE, RAS_ARRAY, RAS_AUTO_COMPRESSION, RAS_BOOLEAN, RAS_BYTE, RAS_CHAR, RAS_COLLECTION, RAS_COMPLEX1, RAS_DOUBLE, RAS_FLOAT, RAS_HDF, RAS_INT, RAS_JPEG, RAS_LONG, RAS_MARRAY, RAS_MINTERVAL, RAS_OID, RAS_PNG, RAS_POINT, RAS_RGB, RAS_SHORT, RAS_SINTERVAL, RAS_STRING, RAS_STRUCTURE, RAS_TIFF, RAS_ULONG, RAS_UNKNOWN, RAS_USHORT, RAS_ZLIB, RASJ_VERSION, RASMGRPORT_DEFAULT, READ, REQUEST_FORMAT_ERROR, RESULT_IS_NO_CELL, RESULT_IS_NO_INTERVAL, SIZE_OF_BOOLEAN, SIZE_OF_BYTE, SIZE_OF_CHAR, SIZE_OF_DOUBLE, SIZE_OF_FLOAT, SIZE_OF_INTEGER, SIZE_OF_LONG, SIZE_OF_RAS_BOOLEAN, SIZE_OF_RAS_BYTE, SIZE_OF_RAS_CHAR, SIZE_OF_RAS_DOUBLE, SIZE_OF_RAS_FLOAT, SIZE_OF_RAS_LONG, SIZE_OF_RAS_SHORT, SIZE_OF_RAS_ULONG, SIZE_OF_RAS_USHORT, SIZE_OF_SHORT, STREAM_INPUT_OVERFLOW, TRANSIENT, TYPE_INVALID, TYPE_NOT_SUPPORTED, TYPE_UNKNOWN, URL_FORMAT_ERROR, WRITE_TRANS_IN_PROGRESS
-
-
Constructor Summary
Constructors Constructor Description RasMArrayShort()default constructorRasMArrayShort(RasMArrayShort obj)copy constructorRasMArrayShort(RasMInterval initDomain)constructor for uninitialized MDD objectsRasMArrayShort(RasMInterval initDomain, boolean allocateData)constructor for uninitialized MDD objectsRasMArrayShort(RasMInterval initDomain, RasStorageLayout stl)Constructor for uninitialized MDD objects with Storage LayoutRasMArrayShort(RasMInterval initDomain, RasStorageLayout stl, boolean allocateData)Constructor for uninitialized MDD objects with Storage Layout
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]getArray()get the internal representation of the array in bytes, please use getShortArray()byte[]getCell(RasPoint point)subscript operator for read access of a cell.intgetShort(RasPoint point)subscript operator for read access of a cell.short[]getShortArray()get the internal representation of the arrayvoidsetArray(short[] newData)set the internal representation of the array-
Methods inherited from class rasj.RasGMArray
getArraySize, getBaseTypeSchema, getCurrentFormat, getStorageLayout, getTypeLength, intersectionWith, setArray, setArraySize, setCurrentFormat, setSpatialDomain, setStorageLayout, setTo, setTypeLength, spatialDomain, toString, toTestString
-
Methods inherited from class rasj.odmg.RasObject
getLock, getObjectName, getObjectType, getObjectTypeName, getOID, getStatus, getTypeSchema, getTypeStructure, rasDeactivate, setLock, setObjectName, setObjectType, setObjectTypeName, setOID, setStatus, setTypeStructure
-
-
-
-
Constructor Detail
-
RasMArrayShort
public RasMArrayShort()
default constructor
-
RasMArrayShort
public RasMArrayShort(RasMInterval initDomain)
constructor for uninitialized MDD objects- Parameters:
initDomain- The initial Domain of the MArray
-
RasMArrayShort
public RasMArrayShort(RasMInterval initDomain, boolean allocateData)
constructor for uninitialized MDD objects- Parameters:
initDomain- The initial Domain of the MArrayallocateData- control whether to allocate the data or not
-
RasMArrayShort
public RasMArrayShort(RasMInterval initDomain, RasStorageLayout stl)
Constructor for uninitialized MDD objects with Storage Layout- Parameters:
initDomain- The initial Domain of the MArraystl- The storage layout to be used
-
RasMArrayShort
public RasMArrayShort(RasMInterval initDomain, RasStorageLayout stl, boolean allocateData)
Constructor for uninitialized MDD objects with Storage Layout- Parameters:
initDomain- The initial Domain of the MArraystl- The storage layout to be usedallocateData- control whether to allocate the data or not
-
RasMArrayShort
public RasMArrayShort(RasMArrayShort obj)
copy constructor- Parameters:
obj- a copy of this object will be created
-
-
Method Detail
-
getCell
public byte[] getCell(RasPoint point) throws RasDimensionMismatchException, RasIndexOutOfBoundsException
subscript operator for read access of a cell. The cell value is returned as a byte[SIZE_OF_SHORT] array. This kind of access to a cell is significantly slower than getShort(), because each cell value has to be converted from short to a byte[SIZE_OF_SHORT] array. The user has to take care that each Cell value is stored, before getting the next Cell.- Overrides:
getCellin classRasGMArray- Parameters:
point- the coordinates of the requested cell- Returns:
- a byte array representing the value of the requested cell.
- Throws:
RasDimensionMismatchExceptionRasIndexOutOfBoundsException
-
getShort
public int getShort(RasPoint point) throws RasDimensionMismatchException, RasIndexOutOfBoundsException
subscript operator for read access of a cell. The cell value is returned as an short. This access method is faster then getCell(), because no conversion from short to byte[SIZE_OF_SHORT] has to be done.
-
getShortArray
public short[] getShortArray()
get the internal representation of the array
-
getArray
public byte[] getArray()
get the internal representation of the array in bytes, please use getShortArray()- Overrides:
getArrayin classRasGMArray- Returns:
- the byte array representing this GMArray
-
setArray
public void setArray(short[] newData)
set the internal representation of the array
-
-