本文整理汇总了Java中org.apache.poi.util.LittleEndian.getUnsignedByte方法的典型用法代码示例。如果您正苦于以下问题:Java LittleEndian.getUnsignedByte方法的具体用法?Java LittleEndian.getUnsignedByte怎么用?Java LittleEndian.getUnsignedByte使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.poi.util.LittleEndian
的用法示例。
在下文中一共展示了LittleEndian.getUnsignedByte方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getGrpprl
import org.apache.poi.util.LittleEndian; //导入方法依赖的package包/类
/**
* Gets the papx for the pagraph at index in this fkp.
*
* @param index The index of the papx to get.
* @return a papx grpprl.
*/
public byte[] getGrpprl(int index)
{
int papxOffset = 2 * LittleEndian.getUnsignedByte(_fkp, ((_crun + 1) * 4) + (index * 13));
int size = 2 * LittleEndian.getUnsignedByte(_fkp, papxOffset);
if(size == 0)
{
size = 2 * LittleEndian.getUnsignedByte(_fkp, ++papxOffset);
}
else
{
size--;
}
byte[] papx = new byte[size];
System.arraycopy(_fkp, ++papxOffset, papx, 0, size);
return papx;
}
示例2: getGrpprl
import org.apache.poi.util.LittleEndian; //导入方法依赖的package包/类
/**
* Gets the chpx for the character run at index in this fkp.
*
* @param index The index of the chpx to get.
* @return a chpx grpprl.
*/
public byte[] getGrpprl(int index)
{
int chpxOffset = 2 * LittleEndian.getUnsignedByte(_fkp, ((_crun + 1) * 4) + index);
//optimization if offset == 0 use "Normal" style
if(chpxOffset == 0)
{
return new byte[0];
}
int size = LittleEndian.getUnsignedByte(_fkp, chpxOffset);
byte[] chpx = new byte[size];
System.arraycopy(_fkp, ++chpxOffset, chpx, 0, size);
return chpx;
}
示例3: read
import org.apache.poi.util.LittleEndian; //导入方法依赖的package包/类
public void read(byte[] data, int offset){
int pos = offset;
wmfsize = LittleEndian.getInt(data, pos); pos += LittleEndian.INT_SIZE;
int left = LittleEndian.getInt(data, pos); pos += LittleEndian.INT_SIZE;
int top = LittleEndian.getInt(data, pos); pos += LittleEndian.INT_SIZE;
int right = LittleEndian.getInt(data, pos); pos += LittleEndian.INT_SIZE;
int bottom = LittleEndian.getInt(data, pos); pos += LittleEndian.INT_SIZE;
bounds = new Rectangle(left, top, right-left, bottom-top);
int width = LittleEndian.getInt(data, pos); pos += LittleEndian.INT_SIZE;
int height = LittleEndian.getInt(data, pos); pos += LittleEndian.INT_SIZE;
size = new Dimension(width, height);
zipsize = LittleEndian.getInt(data, pos); pos += LittleEndian.INT_SIZE;
compression = LittleEndian.getUnsignedByte(data, pos); pos++;
filter = LittleEndian.getUnsignedByte(data, pos); pos++;
}
示例4: getIstd
import org.apache.poi.util.LittleEndian; //导入方法依赖的package包/类
public short getIstd()
{
if ( _buf == null )
return 0;
byte[] buf = getGrpprl();
if (buf.length == 0)
{
return 0;
}
if (buf.length == 1)
{
return (short)LittleEndian.getUnsignedByte(buf, 0);
}
return LittleEndian.getShort(buf);
}
示例5: getGrpprl
import org.apache.poi.util.LittleEndian; //导入方法依赖的package包/类
/**
* Gets the papx grpprl for the paragraph at index in this fkp.
*
* @param index The index of the papx to get.
* @return a papx grpprl.
*/
protected byte[] getGrpprl(int index)
{
int papxOffset = 2 * LittleEndian.getUnsignedByte(_fkp, _offset + (((_crun + 1) * FC_SIZE) + (index * BX_SIZE)));
int size = 2 * LittleEndian.getUnsignedByte(_fkp, _offset + papxOffset);
if(size == 0)
{
size = 2 * LittleEndian.getUnsignedByte(_fkp, _offset + ++papxOffset);
}
else
{
size--;
}
byte[] papx = new byte[size];
System.arraycopy(_fkp, _offset + ++papxOffset, papx, 0, size);
return papx;
}
示例6: getGrpprl
import org.apache.poi.util.LittleEndian; //导入方法依赖的package包/类
/**
* Gets the chpx for the character run at index in this fkp.
*
* @param index The index of the chpx to get.
* @return a chpx grpprl.
*/
protected byte[] getGrpprl(int index)
{
int chpxOffset = 2 * LittleEndian.getUnsignedByte(_fkp, _offset + (((_crun + 1) * 4) + index));
//optimization if offset == 0 use "Normal" style
if(chpxOffset == 0)
{
return new byte[0];
}
int size = LittleEndian.getUnsignedByte(_fkp, _offset + chpxOffset);
byte[] chpx = new byte[size];
System.arraycopy(_fkp, _offset + ++chpxOffset, chpx, 0, size);
return chpx;
}
示例7: OEPlaceholderAtom
import org.apache.poi.util.LittleEndian; //导入方法依赖的package包/类
/**
* Build an instance of <code>OEPlaceholderAtom</code> from on-disk data
*/
protected OEPlaceholderAtom(byte[] source, int start, int len) {
_header = new byte[8];
int offset = start;
System.arraycopy(source,start,_header,0,8);
offset += _header.length;
placementId = LittleEndian.getInt(source, offset); offset += 4;
placeholderId = LittleEndian.getUnsignedByte(source, offset); offset++;
placeholderSize = LittleEndian.getUnsignedByte(source, offset); offset++;
}
示例8: FormattedDiskPage
import org.apache.poi.util.LittleEndian; //导入方法依赖的package包/类
/**
* Uses a 512-byte array to create a FKP
*/
public FormattedDiskPage(byte[] documentStream, int offset)
{
_crun = LittleEndian.getUnsignedByte(documentStream, offset + 511);
_fkp = documentStream;
_offset = offset;
}
示例9: Ffn
import org.apache.poi.util.LittleEndian; //导入方法依赖的package包/类
public Ffn(byte[] buf, int offset)
{
int offsetTmp = offset;
_cbFfnM1 = LittleEndian.getUnsignedByte(buf,offset);
offset += LittleEndian.BYTE_SIZE;
_info = buf[offset];
offset += LittleEndian.BYTE_SIZE;
_wWeight = LittleEndian.getShort(buf, offset);
offset += LittleEndian.SHORT_SIZE;
_chs = buf[offset];
offset += LittleEndian.BYTE_SIZE;
_ixchSzAlt = buf[offset];
offset += LittleEndian.BYTE_SIZE;
// read panose and fs so we can write them back out.
System.arraycopy(buf, offset, _panose, 0, _panose.length);
offset += _panose.length;
System.arraycopy(buf, offset, _fontSig, 0, _fontSig.length);
offset += _fontSig.length;
offsetTmp = offset - offsetTmp;
_xszFfnLength = (this.getSize() - offsetTmp)/2;
_xszFfn = new char[_xszFfnLength];
for(int i = 0; i < _xszFfnLength; i++)
{
_xszFfn[i] = (char)LittleEndian.getShort(buf, offset);
offset += LittleEndian.SHORT_SIZE;
}
}
示例10: FormattedDiskPage
import org.apache.poi.util.LittleEndian; //导入方法依赖的package包/类
/**
* Uses a 512-byte array to create a FKP
*/
public FormattedDiskPage(byte[] fkp)
{
_crun = LittleEndian.getUnsignedByte(fkp, 511);
_fkp = fkp;
}