projects
/
org.ibex.io.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
229e1d6
)
added transcribe(StringBuffer)
author
adam
<adam@megacz.com>
Wed, 23 Feb 2005 04:38:23 +0000
(
04:38
+0000)
committer
adam
<adam@megacz.com>
Wed, 23 Feb 2005 04:38:23 +0000
(
04:38
+0000)
darcs-hash:
20050223043823
-5007d-
d0973db1c2c4b15d2fe33305651a4c15db9ab6ce
.gz
src/org/ibex/io/Stream.java
patch
|
blob
|
history
diff --git
a/src/org/ibex/io/Stream.java
b/src/org/ibex/io/Stream.java
index
19363b0
..
019a2f4
100644
(file)
--- a/
src/org/ibex/io/Stream.java
+++ b/
src/org/ibex/io/Stream.java
@@
-38,6
+38,17
@@
public class Stream {
} catch (IOException ioe) { throw new StreamException(ioe); }
}
} catch (IOException ioe) { throw new StreamException(ioe); }
}
+ public void transcribe(StringBuffer out) {
+ //try {
+ char[] buf = new char[1024];
+ while(true) {
+ int numread = in.read(buf, 0, buf.length);
+ if (numread==-1) return;
+ out.append(buf, 0, numread);
+ }
+ //} catch (IOException ioe) { throw new StreamException(ioe); }
+ }
+
public static int countLines(Stream s) {
int ret = 0;
while(s.readln() != null) ret++;
public static int countLines(Stream s) {
int ret = 0;
while(s.readln() != null) ret++;