public int getSize() { return _xst.getSize() + LittleEndian.SHORT_SIZE; }
public int serialize( byte[] data, int startOffset ) { int offset = startOffset; _xst.serialize( data, offset ); offset += _xst.getSize(); LittleEndian.putUShort( data, offset, _chTerm ); offset += LittleEndian.SHORT_SIZE; return offset - startOffset; }
public int getSizeInBytes() { return LVLF.getSize() + _lvlf.getCbGrpprlChpx() + _lvlf.getCbGrpprlPapx() + _xst.getSize(); }
public void fillFields( byte[] data, int startOffset ) { int offset = startOffset; _xst = new Xst( data, offset ); offset += _xst.getSize(); short term = LittleEndian.getShort( data, offset ); if ( term != 0 ) { if (log.check(POILogger.WARN)) { log.log(POILogger.WARN, "chTerm at the end of Xstz at offset ", offset, " is not 0"); } } }
public byte[] toByteArray() { byte[] buf = IOUtils.safelyAllocate(getSizeInBytes(), MAX_RECORD_LENGTH); int offset = 0; _lvlf.setCbGrpprlChpx( (short) _grpprlChpx.length ); _lvlf.setCbGrpprlPapx( (short) _grpprlPapx.length ); _lvlf.serialize( buf, offset ); offset += LVLF.getSize(); System.arraycopy( _grpprlPapx, 0, buf, offset, _grpprlPapx.length ); offset += _grpprlPapx.length; System.arraycopy( _grpprlChpx, 0, buf, offset, _grpprlChpx.length ); offset += _grpprlChpx.length; _xst.serialize( buf, offset ); offset += _xst.getSize(); return buf; }