Dolda2000 GitWeb
/
jsvc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Replaced ContextResponder with a more generic Destroyable interface.
[jsvc.git]
/
src
/
dolda
/
jsvc
/
util
/
Misc.java
diff --git
a/src/dolda/jsvc/util/Misc.java
b/src/dolda/jsvc/util/Misc.java
index
63a10a7
..
9b7f8e1
100644
(file)
--- a/
src/dolda/jsvc/util/Misc.java
+++ b/
src/dolda/jsvc/util/Misc.java
@@
-6,6
+6,7
@@
import java.io.*;
public class Misc {
public static final java.nio.charset.Charset utf8 = java.nio.charset.Charset.forName("UTF-8");
public class Misc {
public static final java.nio.charset.Charset utf8 = java.nio.charset.Charset.forName("UTF-8");
+ public static final java.nio.charset.Charset ascii = java.nio.charset.Charset.forName("US-ASCII");
private static Map<Integer, String> stext = new HashMap<Integer, String>();
static {
private static Map<Integer, String> stext = new HashMap<Integer, String>();
static {
@@
-131,4
+132,14
@@
public class Misc {
return(false);
throw(new IllegalArgumentException("value not recognized as boolean: " + val));
}
return(false);
throw(new IllegalArgumentException("value not recognized as boolean: " + val));
}
+
+ public static void eatws(PushbackReader in) throws IOException {
+ int c;
+ do {
+ c = in.read();
+ if(c < 0)
+ return;
+ } while(Character.isWhitespace(c));
+ in.unread(c);
+ }
}
}