home *** CD-ROM | disk | FTP | other *** search
- package java.io;
-
- public abstract class Reader {
- protected Object lock;
- private static final int maxSkipBufferSize = 8192;
- private char[] skipBuffer;
-
- protected Reader() {
- this.lock = this;
- }
-
- protected Reader(Object var1) {
- this.lock = var1;
- }
-
- public int read() throws IOException {
- char[] var1 = new char[1];
- return this.read(var1, 0, 1) == -1 ? -1 : var1[0];
- }
-
- public int read(char[] var1) throws IOException {
- return this.read(var1, 0, var1.length);
- }
-
- public abstract int read(char[] var1, int var2, int var3) throws IOException;
-
- public long skip(long var1) throws IOException {
- int var3 = (int)Math.min(var1, 8192L);
- Object var6 = this.lock;
- synchronized(var6){}
-
- long var4;
- try {
- if (this.skipBuffer == null || this.skipBuffer.length < var3) {
- this.skipBuffer = new char[var3];
- }
-
- long var8;
- int var10;
- for(var8 = var1; var8 > 0L; var8 -= (long)var10) {
- var10 = this.read(this.skipBuffer, 0, var3);
- if (var10 == -1) {
- break;
- }
- }
-
- var4 = var1 - var8;
- } catch (Throwable var12) {
- throw var12;
- }
-
- return var4;
- }
-
- public boolean ready() throws IOException {
- return false;
- }
-
- public boolean markSupported() {
- return false;
- }
-
- public void mark(int var1) throws IOException {
- throw new IOException("mark() not supported");
- }
-
- public void reset() throws IOException {
- throw new IOException("reset() not supported");
- }
-
- public abstract void close() throws IOException;
- }
-