Bugfixes for NonBlockingInputStreamReader.
This commit is contained in:
parent
7c8a3be4ac
commit
b47ca10660
@ -1,6 +1,6 @@
|
|||||||
#Thu, 08 Aug 2013 20:03:53 -0500
|
#Thu, 08 Aug 2013 20:37:37 -0500
|
||||||
name=jdb-util
|
name=jdb-util
|
||||||
version=1.10
|
version=1.11
|
||||||
lib.local=true
|
lib.local=true
|
||||||
|
|
||||||
build.number=0
|
build.number=3
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package com.jdbernard.io;
|
package com.jdbernard.io;
|
||||||
|
|
||||||
public class NonBlockingReader implements Runnable {
|
public class NonBlockingInputStreamReader implements Runnable {
|
||||||
|
|
||||||
private Reader rin
|
private Reader rin
|
||||||
private LinkedList buffer = []
|
private LinkedList buffer = []
|
||||||
@ -16,6 +16,6 @@ public class NonBlockingReader implements Runnable {
|
|||||||
public synchronized String readLine() { return buffer.poll() }
|
public synchronized String readLine() { return buffer.poll() }
|
||||||
private synchronized void storeLine(String line) { buffer << line }
|
private synchronized void storeLine(String line) { buffer << line }
|
||||||
|
|
||||||
public NonBlockingReader(def sin) {
|
public NonBlockingInputStreamReader(def sin) {
|
||||||
this.rin = new InputStreamReader(sin) }
|
this.rin = new InputStreamReader(sin) }
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user