ListFormatOverrideLevelpublic class ListFormatOverrideLevel extends Object
Fields Summary |
---|
private static final int | BASE_SIZE | int | _iStartAt | byte | _info | private static BitField | _ilvl | private static BitField | _fStartAt | private static BitField | _fFormatting | byte[] | _reserved | ListLevel | _lvl |
Constructors Summary |
---|
public ListFormatOverrideLevel(byte[] buf, int offset)
_iStartAt = LittleEndian.getInt(buf, offset);
offset += LittleEndian.INT_SIZE;
_info = buf[offset++];
System.arraycopy(buf, offset, _reserved, 0, _reserved.length);
offset += _reserved.length;
if (_fFormatting.getValue(_info) > 0)
{
_lvl = new ListLevel(buf, offset);
}
|
Methods Summary |
---|
public boolean | equals(java.lang.Object obj)
if (obj == null)
{
return false;
}
ListFormatOverrideLevel lfolvl = (ListFormatOverrideLevel)obj;
boolean lvlEquality = false;
if (_lvl != null)
{
lvlEquality = _lvl.equals(lfolvl._lvl);
}
else
{
lvlEquality = lfolvl._lvl == null;
}
return lvlEquality && lfolvl._iStartAt == _iStartAt && lfolvl._info == _info &&
Arrays.equals(lfolvl._reserved, _reserved);
| public org.apache.poi.hwpf.model.ListLevel | getLevel()
return _lvl;
| public int | getLevelNum()
return _ilvl.getValue(_info);
| public int | getSizeInBytes()
return (_lvl == null ? BASE_SIZE : BASE_SIZE + _lvl.getSizeInBytes());
| public boolean | isFormatting()
return _fFormatting.getValue(_info) != 0;
| public boolean | isStartAt()
return _fStartAt.getValue(_info) != 0;
| public byte[] | toByteArray()
byte[] buf = new byte[getSizeInBytes()];
int offset = 0;
LittleEndian.putInt(buf, _iStartAt);
offset += LittleEndian.INT_SIZE;
buf[offset++] = _info;
System.arraycopy(_reserved, 0, buf, offset, 3);
offset += 3;
if (_lvl != null)
{
byte[] levelBuf = _lvl.toByteArray();
System.arraycopy(levelBuf, 0, buf, offset, levelBuf.length);
}
return buf;
|
|