@Internal public class OldTextPiece extends TextPiece
_buf, EndComparator, StartComparator| Constructor and Description |
|---|
OldTextPiece(int start, int end, byte[] text, PieceDescriptor pd) |
OldTextPiece(OldTextPiece other) |
| Modifier and Type | Method and Description |
|---|---|
void |
adjustForDelete(int start, int length)
Deprecated.
(已弃用。)
|
int |
bytesLength()
Returns the length, in bytes
(返回长度,以字节为单位)
|
OldTextPiece |
copy() |
boolean |
equals(java.lang.Object other) |
byte[] |
getRawBytes() |
java.lang.StringBuilder |
getStringBuilder() |
int |
hashCode() |
boolean |
isUnicode() |
java.lang.String |
substring(int start, int end)
Deprecated.
(已弃用。)
|
java.lang.String |
toString() |
characterLength, getCP, getPieceDescriptor, getStringBuffercompareTo, getEnd, getStart, limitsAreEqual, setEnd, setStartpublic OldTextPiece(OldTextPiece other)
public OldTextPiece(int start,
int end,
byte[] text,
PieceDescriptor pd)
start - Beginning offset in main document stream, in characters.
(start - 主文档流中的起始偏移量,以字符为单位。)
end - Ending offset in main document stream, in characters.
(end - 主文档流中的结束偏移量,以字符为单位。)
text - The raw bytes of our text
(text - 我们文本的原始字节)
@NotImplemented public boolean isUnicode()
public java.lang.StringBuilder getStringBuilder()
getStringBuilder in class
TextPiece
public byte[] getRawBytes()
getRawBytes in class
TextPiece
@Deprecated @NotImplemented public java.lang.String substring(int start, int end)
@Deprecated @NotImplemented public void adjustForDelete(int start, int length)
adjustForDelete in class
TextPiece
start - The start position for the delete, in characters
(start - 删除的开始位置,以字符为单位)
length - The number of characters to delete
(length - 要删除的字符数)
public int bytesLength()
bytesLength in class
TextPiece
public OldTextPiece copy()
copy in interface
Duplicatable
(复制到界面 Duplicatable)
copy in class
TextPiece
Copyright 2021 The Apache Software Foundation or its licensors, as applicable.