|
Gridarta Editor
|
Utility class to encode arbitrary Strings to fit in a single text line. More...
Collaboration diagram for net.sf.gridarta.preferences.Codec:Static Public Member Functions | |
| static String | decode (@NotNull final String str) |
| Decode a string which was encoded by encode(String). More... | |
| static String | encode (@NotNull final String str) |
| Encode a string to make it fit into one line. More... | |
Private Member Functions | |
| Codec () | |
| Private constructor to prevent instantiation. More... | |
Static Private Attributes | |
| static final Pattern [] | PATTERNS_DECODE = { Pattern.compile("\\\\n"), Pattern.compile("\\\\r"), Pattern.compile("\\\\\\\\"), } |
| Patterns that must be decoded. More... | |
| static final Pattern [] | PATTERNS_ENCODE = { Pattern.compile("\\\\"), Pattern.compile("\r"), Pattern.compile("\n"), } |
| Patterns that must be encoded. More... | |
| static final String [] | REPLACEMENTS_DECODE = { Matcher.quoteReplacement("\n"), Matcher.quoteReplacement("\r"), Matcher.quoteReplacement("\\"), } |
| The replacement strings for PATTERNS_DECODE. More... | |
| static final String [] | REPLACEMENTS_ENCODE = { Matcher.quoteReplacement("\\\\"), Matcher.quoteReplacement("\\r"), Matcher.quoteReplacement("\\n"), } |
| The replacement strings for PATTERNS_ENCODE. More... | |
Utility class to encode arbitrary Strings to fit in a single text line.
For any string
,
is a string that does not contain or
characters and
holds.
Definition at line 32 of file Codec.java.
|
private |
Private constructor to prevent instantiation.
Definition at line 63 of file Codec.java.
|
static |
Decode a string which was encoded by encode(String).
| str | the string to be decoded |
Definition at line 89 of file Codec.java.
Referenced by net.sf.gridarta.preferences.Storage.loadValues().
Here is the caller graph for this function:
|
static |
Encode a string to make it fit into one line.
| str | the string to be encoded |
Definition at line 73 of file Codec.java.
Referenced by net.sf.gridarta.preferences.Storage.saveNode().
Here is the caller graph for this function:
|
staticprivate |
Patterns that must be decoded.
The corresponding replacement strings are REPLACEMENTS_DECODE.
Definition at line 52 of file Codec.java.
|
staticprivate |
Patterns that must be encoded.
The corresponding replacement strings are REPLACEMENTS_ENCODE.
Definition at line 39 of file Codec.java.
|
staticprivate |
The replacement strings for PATTERNS_DECODE.
Definition at line 58 of file Codec.java.
|
staticprivate |
The replacement strings for PATTERNS_ENCODE.
Definition at line 45 of file Codec.java.