public Xstz() { _xst = new Xst(); }
public String getNumberText() { return _xst.getAsJavaString(); }
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 int getSize() { return _xst.getSize() + LittleEndian.SHORT_SIZE; }
@Override public boolean equals( Object obj ) { if (!(obj instanceof ListLevel)) return false; ListLevel lvl = (ListLevel) obj; return lvl._lvlf.equals( this._lvlf ) && Arrays.equals( lvl._grpprlChpx, _grpprlChpx ) && Arrays.equals( lvl._grpprlPapx, _grpprlPapx ) && lvl._xst.equals( this._xst ); }
public int getSizeInBytes() { return LVLF.getSize() + _lvlf.getCbGrpprlChpx() + _lvlf.getCbGrpprlPapx() + _xst.getSize(); }
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; }
@Override public String toString() { return "[Xstz]" + _xst.getAsJavaString() + "[/Xstz]"; } }
public String getAsJavaString() { return _xst.getAsJavaString(); }
public ListLevel( int startAt, int numberFormatCode, int alignment, byte[] numberProperties, byte[] entryProperties, String numberText ) { _lvlf = new LVLF(); setStartAt( startAt ); _lvlf.setNfc( (byte) numberFormatCode ); _lvlf.setJc( (byte) alignment ); _grpprlChpx = numberProperties.clone(); _grpprlPapx = entryProperties.clone(); _xst = new Xst(numberText); }