com.ohrasys.cad.gds
Class GDSRecord

java.lang.Object
  extended by com.ohrasys.cad.gds.GDSRecord
Direct Known Subclasses:
GDSAngleRecord, GDSArefRecord, GDSAttrtableRecord, GDSBgnextnRecord, GDSBgnlibRecord, GDSBgnstrRecord, GDSBorderRecord, GDSBoundaryRecord, GDSBoxRecord, GDSBoxtypeRecord, GDSColrowRecord, GDSContactRecord, GDSDatatypeRecord, GDSElflagsRecord, GDSElkeyRecord, GDSEndelRecord, GDSEndextnRecord, GDSEndlibRecord, GDSEndmasksRecord, GDSEndstrRecord, GDSFontsRecord, GDSFormatRecord, GDSGenerationsRecord, GDSHardfenceRecord, GDSHardwireRecord, GDSHeaderRecord, GDSLayerRecord, GDSLibdirsizeRecord, GDSLibnameRecord, GDSLibsecurRecord, GDSLinkkeysRecord, GDSLinktypeRecord, GDSMagRecord, GDSMaskRecord, GDSNodeportRecord, GDSNodeRecord, GDSNodetypeRecord, GDSNullRecord, GDSPathportRecord, GDSPathRecord, GDSPathtypeRecord, GDSPlexRecord, GDSPresentationRecord, GDSPropattrRecord, GDSPropvalueRecord, GDSReflibsRecord, GDSReservedRecord, GDSSnameRecord, GDSSoftfenceRecord, GDSSoftwireRecord, GDSSpacererrorRecord, GDSSpacingRecord, GDSSrefRecord, GDSSrfnameRecord, GDSStransRecord, GDSStrclassRecord, GDSStringRecord, GDSStrnameRecord, GDSStrtypeRecord, GDSStyptableRecord, GDSTapecodeRecord, GDSTapenumRecord, GDSTextnodeRecord, GDSTextRecord, GDSTexttypeRecord, GDSUintegerRecord, GDSUnitsRecord, GDSUserconstraintRecord, GDSUstringRecord, GDSWidthRecord, GDSXyRecord

public class GDSRecord
extends java.lang.Object

This class represents a generic GDSII stream record. A stream record is a byte stream that is divided into four parts.

  1. Size field - The first two bytes form an integer that declares the total number of bytes in the record.
  2. Record type field - The third byte specifies the record type
  3. Data type field - The fourth byte specifies the data type
  4. Data field - The remaining bytes are record data
The records of the stream are normally divided in 2048 byte physical blocks. Records can overlap block boundaries; A record is not required to be wholly contained in a single physical block. Two consecutive zero bytes are a null word. Null words can be used to fill the space between the last record of a library and the end of its physical block. All GDSII records must be an even multiple of bytes. If a record contains ASCII string data and the ASCII string is an odd number of bytes, the last character is a null character. Please see The GDSII techincal reference for a more complete discussion of the GDSII stream syntax.

Since:
1.5

Field Summary
static byte ANGLE
          ANGLE record type
static byte AREF
          AREF record type
static int AREF_ELEM_TYPE
          AREF element identifier
static byte ATTRTABLE
          ATTRTABLE record type
static byte BGNEXTN
          BGNEXTN record type
static byte BGNLIB
          BGNLIB record type
static byte BGNSTR
          BGNSTR record type
static byte BIT_ARRAY_TYPE
          Indicates that record data is a two byte bit array.
static byte BORDER
          BORDER record type
static byte BOUNDARY
          BOUNDARY record type
static int BOUNDARY_ELEM_TYPE
          BOUNDARY element identifier
static byte BOX
          BOX record type
static int BOX_ELEM_TYPE
          BOX element identifier
static byte BOXTYPE
          BOXTYPE record type
static byte COLROW
          COLROW record type
static byte CONTACT
          CONTACT record type
static int CONTACT_ELEM_TYPE
          CONTACT element identifier
protected  byte[] data
          The record data.
static byte DATATYPE
          DATATYPE record type
protected  byte dattype
          The data type of the record.
static byte DOUBLE_TYPE
          Indicates the record data is eight byte floating point.
static byte ELFLAGS
          ELFLAGS record type
static byte ELKEY
          ELKEY record type
static byte ENDEL
          ENDEL record type
static byte ENDEXTN
          ENDEXTN record type
static byte ENDLIB
          ENDLIB record type
static byte ENDMASKS
          ENDMASKS record type
static byte ENDSTR
          ENDSTR record type
static byte FLOAT_TYPE
          Indicates the record data is four byte floating point.
static byte FONTS
          FONTS record type
static byte FORMAT
          FORMAT record type
static byte GENERATIONS
          GENERATIONS record type
static byte HARDFENCE
          HARDFENCE record type
static byte HARDWIRE
          HARDWIRE record type
static byte HEADER
          HEADER record type
protected  com.ohrasys.cad.gds.GDSI18NFactory i18n
          The internationalized message factory
static byte INT_TYPE
          Indicates the record data type is four byte signed integer.
static byte LAYER
          LAYER record type
protected  short length
          The sum total length of all record fields.
static byte LIBDIRSIZE
          LIBDIRSIZE record type
static byte LIBNAME
          LIBNAME record type
static byte LIBSECUR
          LIBSECUR record type
static byte LINKKEYS
          LINKKEYS record type
static byte LINKTYPE
          LINKTYPE record type
static byte MAG
          MAG record type
static byte MASK
          MASK record type
static int MAX_REC_LEN
          The maximum number of data bytes a record may contain
static byte NO_DATA_TYPE
          Indicates a record has no data associated with it.
static byte NODE
          NODE record type
static int NODE_ELEM_TYPE
          NODE element identifier
static byte NODEPORT
          NODEPORT record type
static byte NODETYPE
          NODETYPE record type
static byte NULL
          NULL record type
static byte PATH
          PATH record type
static int PATH_ELEM_TYPE
          PATH element identifier
static byte PATHPORT
          PATHPORT record type
static byte PATHTYPE
          PATHTYPE record type
static byte PLEX
          PLEX record type
static byte PRESENTATION
          PRESENTATION record type
static byte PROPATTR
          PROPATTR record type
static byte PROPVALUE
          PROPVALUE record type
protected  byte rectype
          The record type.
static byte REFLIBS
          REFLIBS record type
static byte RESERVED
          RESERVED record type
static byte SHORT_TYPE
          Indicates the record data type is two byte signed integer.
static byte SNAME
          SNAME record type
static byte SOFTFENCE
          SOFTFENCE record type
static byte SOFTWIRE
          SOFTWIRE record type
static byte SPACER_ERROR
          SPACER_ERROR record type
static byte SPACING
          SPACING record type
static byte SREF
          SREF record type
static int SREF_ELEM_TYPE
          SREF element identifier
static byte SRFNAME
          SRFNAME record type
static byte STRANS
          STRANS record type
static byte STRCLASS
          STRCLASS record type
static byte STRING
          STRING record type
static byte STRING_TYPE
          Indicates the record data is ASCII string data.
static byte STRNAME
          STRNAME record type
static byte STRTYPE
          STRTYPE record type
static byte STYPTABLE
          STYPTABLE record type
static byte TAPECODE
          TAPECODE record type
static byte TAPENUM
          TAPENUM record type
static byte TEXT
          TEXT record type
static int TEXT_ELEM_TYPE
          TEXT element identifier
static byte TEXTNODE
          TEXTNODE record type
static byte TEXTTYPE
          TEXTTYPE record type
static byte UINTEGER
          UINTEGER record type
static byte UNITS
          UNITS record type
static byte USERCONSTRAINT
          USERCONSTRAINT record type
static byte USTRING
          USTRING record type
static byte WIDTH
          WIDTH record type
static byte XY
          XY record type
 
Constructor Summary
GDSRecord()
          Creates a new NULL GDSRecord object.
GDSRecord(GDSRecord rec)
          Creates a new GDSRecord object from an existing record.
GDSRecord(short length, byte rectype, byte dattype, byte[] data)
          Creates a new GDSRecord object.
 
Method Summary
 byte[] getData()
          Returns a copy of the data
 byte getDattype()
          The datatype of the record
 short getLength()
          Return the total record length
 byte getRectype()
          Return the record type
 byte[] toBytes()
          Creates a byte array representation of this gds record suitable for consumption by a stream reader/writer.
 java.lang.String toString()
          Returns a descriptive string representation of the record.
protected  void validateBitarrayRec(byte rectype, short validbits)
          Ensures a record is well formed, of the expected record type, of bit array datatype and that no reserved fields are being utilized.
protected  void validateDoubleRec(byte rectype)
          Ensures a record is well formed, of the expected record type and of double datatype
protected  void validateDoubleRec(byte rectype, int len)
          Ensures a record is well formed, of the expected record type, of double datatype and contains len number of data bytes
protected  void validateDoubleRec(byte rectype, int maxlen, int minlen)
          Ensures a record is well formed, of the expected record type, of double datatype and contains between min and max number of data bytes
protected  void validateFloatRec(byte rectype)
          Ensures a record is well formed, of the expected record type and of float datatype
protected  void validateFloatRec(byte rectype, int len)
          Ensures a record is well formed, of the expected record type, of float datatype and contains len number of data bytes
protected  void validateFloatRec(byte rectype, int maxlen, int minlen)
          Ensures a record is well formed, of the expected record type, of float datatype and contains between min and max number of data bytes
protected  void validateIntRec(byte rectype)
          Ensures a record is well formed, of the expected record type and of int datatype
protected  void validateIntRec(byte rectype, int len)
          Ensures a record is well formed, of the expected record type, of int datatype and contains len number of data bytes
protected  void validateIntRec(byte rectype, int maxlen, int minlen)
          Ensures a record is well formed, of the expected record type, of int datatype and contains between min and max number of data bytes
protected  void validateNodataRec(byte rectype)
          Ensures a record is well formed, of the expected record type and of no data type
protected  void validateShortRec(byte rectype)
          Ensures a record is well formed, of the expected record type and of short datatype
protected  void validateShortRec(byte rectype, int len)
          Ensures a record is well formed, of the expected record type, of short datatype and contains len number of data bytes
protected  void validateShortRec(byte rectype, int maxlen, int minlen)
          Ensures a record is well formed, of the expected record type, of short datatype and contains between min and max number of data bytes
protected  void validateStringRec(byte rectype, int len)
          Ensures a record is well formed, of the expected record type, of string datatype and contains len number of data bytes
protected  void validateStringRec(byte rectype, int maxlen, int minlen)
          Ensures a record is well formed, of the expected record type, of string datatype and contains between min and max number of data bytes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NO_DATA_TYPE

public static final byte NO_DATA_TYPE
Indicates a record has no data associated with it. Records with this datatype should have a record size of 4 bytes.

See Also:
Constant Field Values

BIT_ARRAY_TYPE

public static final byte BIT_ARRAY_TYPE
Indicates that record data is a two byte bit array.

See Also:
Constant Field Values

SHORT_TYPE

public static final byte SHORT_TYPE
Indicates the record data type is two byte signed integer.

See Also:
Constant Field Values

INT_TYPE

public static final byte INT_TYPE
Indicates the record data type is four byte signed integer.

See Also:
Constant Field Values

FLOAT_TYPE

public static final byte FLOAT_TYPE
Indicates the record data is four byte floating point.

See Also:
Constant Field Values

DOUBLE_TYPE

public static final byte DOUBLE_TYPE
Indicates the record data is eight byte floating point.

See Also:
Constant Field Values

STRING_TYPE

public static final byte STRING_TYPE
Indicates the record data is ASCII string data. If the string contains an odd number of characters, a null character is appended. The record byte count includes this null character.

See Also:
Constant Field Values

NULL

public static final byte NULL
NULL record type

See Also:
Constant Field Values

HEADER

public static final byte HEADER
HEADER record type

See Also:
Constant Field Values

BGNLIB

public static final byte BGNLIB
BGNLIB record type

See Also:
Constant Field Values

LIBNAME

public static final byte LIBNAME
LIBNAME record type

See Also:
Constant Field Values

UNITS

public static final byte UNITS
UNITS record type

See Also:
Constant Field Values

ENDLIB

public static final byte ENDLIB
ENDLIB record type

See Also:
Constant Field Values

BGNSTR

public static final byte BGNSTR
BGNSTR record type

See Also:
Constant Field Values

STRNAME

public static final byte STRNAME
STRNAME record type

See Also:
Constant Field Values

ENDSTR

public static final byte ENDSTR
ENDSTR record type

See Also:
Constant Field Values

BOUNDARY

public static final byte BOUNDARY
BOUNDARY record type

See Also:
Constant Field Values

PATH

public static final byte PATH
PATH record type

See Also:
Constant Field Values

SREF

public static final byte SREF
SREF record type

See Also:
Constant Field Values

AREF

public static final byte AREF
AREF record type

See Also:
Constant Field Values

TEXT

public static final byte TEXT
TEXT record type

See Also:
Constant Field Values

LAYER

public static final byte LAYER
LAYER record type

See Also:
Constant Field Values

DATATYPE

public static final byte DATATYPE
DATATYPE record type

See Also:
Constant Field Values

WIDTH

public static final byte WIDTH
WIDTH record type

See Also:
Constant Field Values

XY

public static final byte XY
XY record type

See Also:
Constant Field Values

ENDEL

public static final byte ENDEL
ENDEL record type

See Also:
Constant Field Values

SNAME

public static final byte SNAME
SNAME record type

See Also:
Constant Field Values

COLROW

public static final byte COLROW
COLROW record type

See Also:
Constant Field Values

TEXTNODE

public static final byte TEXTNODE
TEXTNODE record type

See Also:
Constant Field Values

NODE

public static final byte NODE
NODE record type

See Also:
Constant Field Values

TEXTTYPE

public static final byte TEXTTYPE
TEXTTYPE record type

See Also:
Constant Field Values

PRESENTATION

public static final byte PRESENTATION
PRESENTATION record type

See Also:
Constant Field Values

SPACING

public static final byte SPACING
SPACING record type

See Also:
Constant Field Values

STRING

public static final byte STRING
STRING record type

See Also:
Constant Field Values

STRANS

public static final byte STRANS
STRANS record type

See Also:
Constant Field Values

MAG

public static final byte MAG
MAG record type

See Also:
Constant Field Values

ANGLE

public static final byte ANGLE
ANGLE record type

See Also:
Constant Field Values

UINTEGER

public static final byte UINTEGER
UINTEGER record type

See Also:
Constant Field Values

USTRING

public static final byte USTRING
USTRING record type

See Also:
Constant Field Values

REFLIBS

public static final byte REFLIBS
REFLIBS record type

See Also:
Constant Field Values

FONTS

public static final byte FONTS
FONTS record type

See Also:
Constant Field Values

PATHTYPE

public static final byte PATHTYPE
PATHTYPE record type

See Also:
Constant Field Values

GENERATIONS

public static final byte GENERATIONS
GENERATIONS record type

See Also:
Constant Field Values

ATTRTABLE

public static final byte ATTRTABLE
ATTRTABLE record type

See Also:
Constant Field Values

STYPTABLE

public static final byte STYPTABLE
STYPTABLE record type

See Also:
Constant Field Values

STRTYPE

public static final byte STRTYPE
STRTYPE record type

See Also:
Constant Field Values

ELFLAGS

public static final byte ELFLAGS
ELFLAGS record type

See Also:
Constant Field Values

ELKEY

public static final byte ELKEY
ELKEY record type

See Also:
Constant Field Values

LINKTYPE

public static final byte LINKTYPE
LINKTYPE record type

See Also:
Constant Field Values

LINKKEYS

public static final byte LINKKEYS
LINKKEYS record type

See Also:
Constant Field Values

NODETYPE

public static final byte NODETYPE
NODETYPE record type

See Also:
Constant Field Values

PROPATTR

public static final byte PROPATTR
PROPATTR record type

See Also:
Constant Field Values

PROPVALUE

public static final byte PROPVALUE
PROPVALUE record type

See Also:
Constant Field Values

BOX

public static final byte BOX
BOX record type

See Also:
Constant Field Values

BOXTYPE

public static final byte BOXTYPE
BOXTYPE record type

See Also:
Constant Field Values

PLEX

public static final byte PLEX
PLEX record type

See Also:
Constant Field Values

BGNEXTN

public static final byte BGNEXTN
BGNEXTN record type

See Also:
Constant Field Values

ENDEXTN

public static final byte ENDEXTN
ENDEXTN record type

See Also:
Constant Field Values

TAPENUM

public static final byte TAPENUM
TAPENUM record type

See Also:
Constant Field Values

TAPECODE

public static final byte TAPECODE
TAPECODE record type

See Also:
Constant Field Values

STRCLASS

public static final byte STRCLASS
STRCLASS record type

See Also:
Constant Field Values

RESERVED

public static final byte RESERVED
RESERVED record type

See Also:
Constant Field Values

FORMAT

public static final byte FORMAT
FORMAT record type

See Also:
Constant Field Values

MASK

public static final byte MASK
MASK record type

See Also:
Constant Field Values

ENDMASKS

public static final byte ENDMASKS
ENDMASKS record type

See Also:
Constant Field Values

LIBDIRSIZE

public static final byte LIBDIRSIZE
LIBDIRSIZE record type

See Also:
Constant Field Values

SRFNAME

public static final byte SRFNAME
SRFNAME record type

See Also:
Constant Field Values

LIBSECUR

public static final byte LIBSECUR
LIBSECUR record type

See Also:
Constant Field Values

BORDER

public static final byte BORDER
BORDER record type

See Also:
Constant Field Values

SOFTFENCE

public static final byte SOFTFENCE
SOFTFENCE record type

See Also:
Constant Field Values

HARDFENCE

public static final byte HARDFENCE
HARDFENCE record type

See Also:
Constant Field Values

SOFTWIRE

public static final byte SOFTWIRE
SOFTWIRE record type

See Also:
Constant Field Values

HARDWIRE

public static final byte HARDWIRE
HARDWIRE record type

See Also:
Constant Field Values

PATHPORT

public static final byte PATHPORT
PATHPORT record type

See Also:
Constant Field Values

NODEPORT

public static final byte NODEPORT
NODEPORT record type

See Also:
Constant Field Values

USERCONSTRAINT

public static final byte USERCONSTRAINT
USERCONSTRAINT record type

See Also:
Constant Field Values

SPACER_ERROR

public static final byte SPACER_ERROR
SPACER_ERROR record type

See Also:
Constant Field Values

CONTACT

public static final byte CONTACT
CONTACT record type

See Also:
Constant Field Values

PATH_ELEM_TYPE

public static final int PATH_ELEM_TYPE
PATH element identifier

See Also:
Constant Field Values

BOUNDARY_ELEM_TYPE

public static final int BOUNDARY_ELEM_TYPE
BOUNDARY element identifier

See Also:
Constant Field Values

TEXT_ELEM_TYPE

public static final int TEXT_ELEM_TYPE
TEXT element identifier

See Also:
Constant Field Values

CONTACT_ELEM_TYPE

public static final int CONTACT_ELEM_TYPE
CONTACT element identifier

See Also:
Constant Field Values

SREF_ELEM_TYPE

public static final int SREF_ELEM_TYPE
SREF element identifier

See Also:
Constant Field Values

NODE_ELEM_TYPE

public static final int NODE_ELEM_TYPE
NODE element identifier

See Also:
Constant Field Values

BOX_ELEM_TYPE

public static final int BOX_ELEM_TYPE
BOX element identifier

See Also:
Constant Field Values

AREF_ELEM_TYPE

public static final int AREF_ELEM_TYPE
AREF element identifier

See Also:
Constant Field Values

MAX_REC_LEN

public static final int MAX_REC_LEN
The maximum number of data bytes a record may contain

See Also:
Constant Field Values

data

protected byte[] data
The record data.


dattype

protected byte dattype
The data type of the record.


i18n

protected com.ohrasys.cad.gds.GDSI18NFactory i18n
The internationalized message factory


length

protected short length
The sum total length of all record fields.


rectype

protected byte rectype
The record type.

Constructor Detail

GDSRecord

public GDSRecord()
          throws GDSRecordException
Creates a new NULL GDSRecord object.

Throws:
GDSRecordException - If there is an error creating the record

GDSRecord

public GDSRecord(GDSRecord rec)
          throws GDSRecordException
Creates a new GDSRecord object from an existing record.

Parameters:
rec - The record to duplicate
Throws:
GDSRecordException - If the record is malformed

GDSRecord

public GDSRecord(short length,
                 byte rectype,
                 byte dattype,
                 byte[] data)
          throws GDSRecordException
Creates a new GDSRecord object.

Parameters:
length - The total record length
rectype - The record type
dattype - The datatype
data - The record data
Throws:
GDSRecordException - If any of the input parameters would create a malformed record
Method Detail

getData

public byte[] getData()
Returns a copy of the data

Returns:
The record data

getDattype

public byte getDattype()
The datatype of the record

Returns:
Record datatype

getLength

public short getLength()
Return the total record length

Returns:
length

getRectype

public byte getRectype()
Return the record type

Returns:
Record type

toBytes

public byte[] toBytes()
Creates a byte array representation of this gds record suitable for consumption by a stream reader/writer.

Returns:
A byte array representation of the record

toString

public java.lang.String toString()
Returns a descriptive string representation of the record.

Overrides:
toString in class java.lang.Object
Returns:
The record description

validateBitarrayRec

protected void validateBitarrayRec(byte rectype,
                                   short validbits)
                            throws GDSRecordException
Ensures a record is well formed, of the expected record type, of bit array datatype and that no reserved fields are being utilized.

Parameters:
rectype - The expected record type
validbits - A bit mask identifying valid bit positions by a '1'
Throws:
GDSRecordException - Thrown if the record is invalid

validateDoubleRec

protected void validateDoubleRec(byte rectype)
                          throws GDSRecordException
Ensures a record is well formed, of the expected record type and of double datatype

Parameters:
rectype - Expected record type
Throws:
GDSRecordException - Thrown if the record is invalid

validateDoubleRec

protected void validateDoubleRec(byte rectype,
                                 int len)
                          throws GDSRecordException
Ensures a record is well formed, of the expected record type, of double datatype and contains len number of data bytes

Parameters:
rectype - Expected record type
len - Expected number of data bytes
Throws:
GDSRecordException - Thrown if the record is invalid

validateDoubleRec

protected void validateDoubleRec(byte rectype,
                                 int maxlen,
                                 int minlen)
                          throws GDSRecordException
Ensures a record is well formed, of the expected record type, of double datatype and contains between min and max number of data bytes

Parameters:
rectype - Expected record type
maxlen - Max number of data bytes
minlen - Min number of databytes
Throws:
GDSRecordException - Thrown if the record is invalid

validateFloatRec

protected void validateFloatRec(byte rectype)
                         throws GDSRecordException
Ensures a record is well formed, of the expected record type and of float datatype

Parameters:
rectype - Expected record type
Throws:
GDSRecordException - Thrown if the record is invalid

validateFloatRec

protected void validateFloatRec(byte rectype,
                                int len)
                         throws GDSRecordException
Ensures a record is well formed, of the expected record type, of float datatype and contains len number of data bytes

Parameters:
rectype - Expected record type
len - Expected number of data bytes
Throws:
GDSRecordException - Thrown if the record is invalid

validateFloatRec

protected void validateFloatRec(byte rectype,
                                int maxlen,
                                int minlen)
                         throws GDSRecordException
Ensures a record is well formed, of the expected record type, of float datatype and contains between min and max number of data bytes

Parameters:
rectype - Expected record type
maxlen - Max number of data bytes
minlen - Min number of databytes
Throws:
GDSRecordException - Thrown if the record is invalid

validateIntRec

protected void validateIntRec(byte rectype)
                       throws GDSRecordException
Ensures a record is well formed, of the expected record type and of int datatype

Parameters:
rectype - Expected record type
Throws:
GDSRecordException - Thrown if the record is invalid

validateIntRec

protected void validateIntRec(byte rectype,
                              int len)
                       throws GDSRecordException
Ensures a record is well formed, of the expected record type, of int datatype and contains len number of data bytes

Parameters:
rectype - Expected record type
len - Expected number of data bytes
Throws:
GDSRecordException - Thrown if the record is invalid

validateIntRec

protected void validateIntRec(byte rectype,
                              int maxlen,
                              int minlen)
                       throws GDSRecordException
Ensures a record is well formed, of the expected record type, of int datatype and contains between min and max number of data bytes

Parameters:
rectype - Expected record type
maxlen - Max number of data bytes
minlen - Min number of databytes
Throws:
GDSRecordException - Thrown if the record is invalid

validateNodataRec

protected void validateNodataRec(byte rectype)
                          throws GDSRecordException
Ensures a record is well formed, of the expected record type and of no data type

Parameters:
rectype - Expected record type
Throws:
GDSRecordException - Thrown if the record is invalid

validateShortRec

protected void validateShortRec(byte rectype)
                         throws GDSRecordException
Ensures a record is well formed, of the expected record type and of short datatype

Parameters:
rectype - Expected record type
Throws:
GDSRecordException - Thrown if the record is invalid

validateShortRec

protected void validateShortRec(byte rectype,
                                int len)
                         throws GDSRecordException
Ensures a record is well formed, of the expected record type, of short datatype and contains len number of data bytes

Parameters:
rectype - Expected record type
len - Expected number of data bytes
Throws:
GDSRecordException - Thrown if the record is invalid

validateShortRec

protected void validateShortRec(byte rectype,
                                int maxlen,
                                int minlen)
                         throws GDSRecordException
Ensures a record is well formed, of the expected record type, of short datatype and contains between min and max number of data bytes

Parameters:
rectype - Expected record type
maxlen - Max number of data bytes
minlen - Min number of databytes
Throws:
GDSRecordException - Thrown if the record is invalid

validateStringRec

protected void validateStringRec(byte rectype,
                                 int len)
                          throws GDSRecordException
Ensures a record is well formed, of the expected record type, of string datatype and contains len number of data bytes

Parameters:
rectype - Expected record type
len - Expected number of data bytes
Throws:
GDSRecordException - Thrown if the record is invalid

validateStringRec

protected void validateStringRec(byte rectype,
                                 int maxlen,
                                 int minlen)
                          throws GDSRecordException
Ensures a record is well formed, of the expected record type, of string datatype and contains between min and max number of data bytes

Parameters:
rectype - Expected record type
maxlen - Max number of data bytes
minlen - Min number of databytes
Throws:
GDSRecordException - Thrown if the record is invalid