Package org.apache.fontbox.cmap
Class CodespaceRange
- java.lang.Object
-
- org.apache.fontbox.cmap.CodespaceRange
-
public class CodespaceRange extends java.lang.Object
This represents a single entry in the codespace range.
-
-
Field Summary
Fields Modifier and Type Field Description private int
codeLength
private int[]
end
private byte[]
endBytes
private int[]
start
private byte[]
startBytes
-
Constructor Summary
Constructors Constructor Description CodespaceRange()
Deprecated.to be removed in the next major release.CodespaceRange(byte[] startBytes, byte[] endBytes)
Creates a new instance of CodespaceRange.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description int
getCodeLength()
Returns the length of the codes of the codespace.byte[]
getEnd()
Deprecated.to be removed in the next major releasebyte[]
getStart()
Deprecated.to be removed in the next major releaseboolean
isFullMatch(byte[] code, int codeLen)
Returns true if the given code bytes match this codespace range.boolean
matches(byte[] code)
Returns true if the given code bytes match this codespace range.(package private) void
setEnd(byte[] endBytes)
Deprecated.to be removed in the next major release(package private) void
setStart(byte[] startBytes)
Deprecated.to be removed in the next major release
-
-
-
Constructor Detail
-
CodespaceRange
public CodespaceRange(byte[] startBytes, byte[] endBytes)
Creates a new instance of CodespaceRange. The length of both arrays has to be the same.
For one byte ranges startBytes and endBytes define a linear range of values. Double byte values define a rectangular range not a linear range. Examples:
<00> <20> defines a linear range from 0x00 up to 0x20.
<8140> to <9FFC> defines a rectangular range. The high byte has to be within 0x81 and 0x9F and the low byte has to be within 0x40 and 0xFC- Parameters:
startBytes
-endBytes
-
-
CodespaceRange
public CodespaceRange()
Deprecated.to be removed in the next major release.Creates a new instance of CodespaceRange.
-
-
Method Detail
-
getCodeLength
public int getCodeLength()
Returns the length of the codes of the codespace.- Returns:
- the code length
-
getEnd
public byte[] getEnd()
Deprecated.to be removed in the next major releaseGetter for property end.- Returns:
- Value of property end.
-
setEnd
void setEnd(byte[] endBytes)
Deprecated.to be removed in the next major releaseSetter for property end.- Parameters:
endBytes
- New value of property end.
-
getStart
public byte[] getStart()
Deprecated.to be removed in the next major releaseGetter for property start.- Returns:
- Value of property start.
-
setStart
void setStart(byte[] startBytes)
Deprecated.to be removed in the next major releaseSetter for property start.- Parameters:
startBytes
- New value of property start.
-
matches
public boolean matches(byte[] code)
Returns true if the given code bytes match this codespace range.
-
isFullMatch
public boolean isFullMatch(byte[] code, int codeLen)
Returns true if the given code bytes match this codespace range.
-
-