@Internal public final class PieceDescriptor extends java.lang.Object implements Duplicatable
Constructor and Description |
---|
PieceDescriptor(byte[] buf, int offset) |
PieceDescriptor(byte[] buf, int offset, java.nio.charset.Charset charset)
This initializer should only be used for HWPFOldDocuments.
|
PieceDescriptor(PieceDescriptor other) |
Modifier and Type | Method and Description |
---|---|
PieceDescriptor |
copy() |
boolean |
equals(java.lang.Object obj) |
java.nio.charset.Charset |
getCharset() |
int |
getFilePosition() |
PropertyModifier |
getPrm() |
static int |
getSizeInBytes() |
int |
hashCode() |
boolean |
isUnicode() |
void |
setFilePosition(int pos) |
protected byte[] |
toByteArray() |
java.lang.String |
toString() |
public PieceDescriptor(PieceDescriptor other)
public PieceDescriptor(byte[] buf, int offset)
public PieceDescriptor(byte[] buf, int offset, java.nio.charset.Charset charset)
buf
- The buffer to read data from
(buf - 从中读取数据的缓冲区)
offset
- The offset into the buffer to start reading from
(offset - 要开始读取的缓冲区中的偏移量)
charset
- which charset to use if this is not unicode
(charset - 如果这不是 unicode,则使用哪个字符集)
public int getFilePosition()
public void setFilePosition(int pos)
public boolean isUnicode()
public int hashCode()
hashCode
in class
java.lang.Object
public java.nio.charset.Charset getCharset()
null
(如果这不是 Unicode PieceDescriptor 则使用的字符集 这可以是 null)
public PropertyModifier getPrm()
protected byte[] toByteArray()
public static int getSizeInBytes()
public boolean equals(java.lang.Object obj)
equals
in class
java.lang.Object
public java.lang.String toString()
toString
in class
java.lang.Object
public PieceDescriptor copy()
copy
in interface
Duplicatable
(复制到界面 Duplicatable)
Copyright 2021 The Apache Software Foundation or its licensors, as applicable.