Package org.zkoss.util
Class Checksums
java.lang.Object
org.zkoss.util.Checksums
Checksum relevant utilities.
- Author:
- tomyeh
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic final chargetChecksum(StringBuffer val, String skips) Returns the checksum character of the specified val.static final chargetChecksum(String val, String skips) Returns the checksum character of the specified val.static final StringtoReadable(long val, String skips) Returns a readable string plus a checksum.static final chartoReadableChar(int val, String skips) Returns the character of the specified val by skipping skips.
-
Field Details
-
SKIPS
The default skips.- See Also:
-
-
Constructor Details
-
Checksums
public Checksums()
-
-
Method Details
-
toReadable
Returns a readable string plus a checksum.- Parameters:
skips- specifies a string of characters that shall be skipped. If null specified, "DEOX" is assumed. To skip nothing, specify "". You can only specify upper-case letters: A-Z. And, it must be in alphabetic order.
-
toReadableChar
Returns the character of the specified val by skipping skips. Note: the caller must ensure val is in the right range: 0 - (36 - skips.length()).- Parameters:
skips- specifies a string of characters that shall be skipped. If null specified, "DEOX" is assumed. To skip nothing, specify "". You can only specify upper-case letters: A-Z. And, it must be in alphabetic order.
-
getChecksum
Returns the checksum character of the specified val.It use
toReadableChar(int, java.lang.String)to convert the checksum to a character.Note: it skips '-' and ' '.
- Parameters:
skips- specifies a string of characters that shall be skipped. If null specified, "DEOX" is assumed. To skip nothing, specify "". You can only specify upper-case letters: A-Z. And, it must be in alphabetic order.
-
getChecksum
Returns the checksum character of the specified val.It use
toReadableChar(int, java.lang.String)to convert the checksum to a character.Note: it skips '-' and ' '.
- Parameters:
skips- specifies a string of characters that shall be skipped. If null specified, "DEOX" is assumed. To skip nothing, specify "". You can only specify upper-case letters: A-Z. And, it must be in alphabetic order.
-