class RCSget extends InputStream {
    private final InputStream stream;

    /**
     * Pass null in version to get current revision.
     * @param file file contents to get
     * @param version specified revision or @{code null}
     * @throws java.io.IOException if I/O exception occurred
     * @throws java.io.FileNotFoundException if the file cannot be found
     */
    public RCSget(String file, String version) throws IOException, FileNotFoundException {
        try {
            Archive archive = new Archive(file);
            Object[] lines;

            if (version == null) {
                lines = archive.getRevision(false);
            } else {
                lines = archive.getRevision(version, false);
            }

            StringBuilder sb = new StringBuilder();
            for (Object line : lines) {
                sb.append((String) line);
                sb.append("\n");
            }
            stream = new ByteArrayInputStream(sb.toString().getBytes());
        } catch (ParseException e) {
            throw RCSRepository.wrapInIOException("Parse error", e);
        } catch (InvalidFileFormatException e) {
            throw RCSRepository.wrapInIOException("Invalid RCS file format", e);
        } catch (PatchFailedException e) {
            throw RCSRepository.wrapInIOException("Patch failed", e);
        } catch (NodeNotFoundException e) {
            throw RCSRepository.wrapInIOException(
                    "Revision " + version + " not found", e);
        }
    }

    @Override
    public synchronized void reset() throws IOException {
        stream.reset();
    }

    @Override
    public void close() throws IOException {
        IOUtils.close(stream);
    }

    @Override
    public synchronized void mark(int readlimit) {
        stream.mark(readlimit);
    }

    @Override
    public int read(byte[] buffer, int pos, int len) throws IOException {
        return stream.read(buffer, pos, len);
    }

    @Override
    public int read() throws IOException {<FILL_FUNCTION_BODY>}
}

        throw new IOException("use a BufferedInputStream. just read() is not supported!");
    
<methods>public void <init>() ,public int available() throws java.io.IOException,public void close() throws java.io.IOException,public synchronized void mark(int) ,public boolean markSupported() ,public static java.io.InputStream nullInputStream() ,public abstract int read() throws java.io.IOException,public int read(byte[]) throws java.io.IOException,public int read(byte[], int, int) throws java.io.IOException,public byte[] readAllBytes() throws java.io.IOException,public byte[] readNBytes(int) throws java.io.IOException,public int readNBytes(byte[], int, int) throws java.io.IOException,public synchronized void reset() throws java.io.IOException,public long skip(long) throws java.io.IOException,public void skipNBytes(long) throws java.io.IOException,public long transferTo(java.io.OutputStream) throws java.io.IOException<variables>private static final int DEFAULT_BUFFER_SIZE,private static final int MAX_BUFFER_SIZE,private static final int MAX_SKIP_BUFFER_SIZE