// Decompiled by Jad v1.5.8e2. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://kpdus.tripod.com/jad.html
// Decompiler options: packimports(3) fieldsfirst ansi space
// Source File Name: Demo12.java
import java.io.IOException;
import java.io.InputStream;
class MyBufferedInputStream
{
private InputStream in;
byte buf[];
private int count;
private int pos;
MyBufferedInputStream(InputStream inputstream)
{
buf = new byte[4096];
count = 0;
pos = 0;
in = inputstream;
}
public int myRead()
throws IOException
{
if (count == 0)
{
count = in.read(buf);
if (count < 0)
{
return -1;
} else
{
pos = 0;
byte byte0 = buf[pos];
count--;
pos++;
return byte0 & 0xff;
}
}
if (count > 0)
{
byte byte1 = buf[pos];
count--;
pos++;
return byte1 & 0xff;
} else
{
return -1;
}
}
public void myClose()
throws IOException
{
in.close();
}
}
|
|