|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object | +--net.sourceforge.foobase.Util
Collection of general utility methods.
The code in this class consists of static methods.
| Field Summary | |
static java.lang.String |
__version
|
| Constructor Summary | |
Util()
|
|
| Method Summary | |
static java.lang.String |
bytesToString(byte[] bar)
Convert an 7-bit ASCII byte array to String. |
static java.lang.String |
bytesToString(byte[] bar,
int ofs,
int len)
Convert an 7-bit ASCII byte array to String. |
static java.lang.String |
convertSymbols(java.lang.String s)
Convert all special symbols in the input string by the equivalent external representation. |
static java.lang.String |
getBishopCode()
Retrieve internal encoding for a bishop piece. |
static java.lang.String |
getKingCode()
Retrieve internal encoding for a king piece. |
static java.lang.String |
getKnightCode()
Retrieve internal encoding for a knight piece. |
static java.lang.String |
getPawnCode()
Retrieve internal encoding for a pawn piece. |
static java.lang.String |
getQueenCode()
Retrieve internal encoding for a queen piece. |
static java.lang.String |
getRookCode()
Retrieve internal encoding for a rook piece. |
static void |
setPieceNames(java.lang.String kn,
java.lang.String q,
java.lang.String r,
java.lang.String b,
java.lang.String kt,
java.lang.String p)
Set names to use for different pieces. |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Field Detail |
public static final java.lang.String __version
| Constructor Detail |
public Util()
| Method Detail |
public static java.lang.String bytesToString(byte[] bar,
int ofs,
int len)
String.bar - byte[] to convertofs - int containing the start offset for the
conversionlen - int containing the number of bytes to convertString representation of inputpublic static java.lang.String bytesToString(byte[] bar)
String.bar - byte[] to convertString representation of inputpublic static java.lang.String convertSymbols(java.lang.String s)
Internally, a set of special unicode codes in the "Private Use
Area" is used for indication of special purpose symbols in chess
(such as figurines for pieces, symbols for terms like
"with compensation" etc.) The range used for those special
codes is 0xEDxx where the xx represents a
value in the range 0x00 up to 0xFF.
s - String in which to replace the special charactersString containing the input string with special
codes converted.
public static void setPieceNames(java.lang.String kn,
java.lang.String q,
java.lang.String r,
java.lang.String b,
java.lang.String kt,
java.lang.String p)
kn - String to use for kingq - String to use for queenr - String to use for rookb - String to use for bishopkt - String to use for knightp - String to use for pawnpublic static java.lang.String getKingCode()
String containing the internal encoding for a
king piece.public static java.lang.String getQueenCode()
String containing the internal encoding for a
queen piece.public static java.lang.String getRookCode()
String containing the internal encoding for a
rook piece.public static java.lang.String getBishopCode()
String containing the internal encoding for a
bishop piece.public static java.lang.String getKnightCode()
String containing the internal encoding for a
knight piece.public static java.lang.String getPawnCode()
String containing the internal encoding for a
pawn piece.
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||