@@ -0,0 +1,1943 @@
+package org.apache.hadoop.fs.gtfs;%0A%0A/**%0A * Created with IntelliJ IDEA.%0A * User: kair%0A * Date: 8/14/13%0A * Time: 12:14 AM%0A * To change this template use File %7C Settings %7C File Templates.%0A */%0A%0Aimport java.io.*;%0Aimport java.nio.ByteBuffer;%0A%0Aimport org.apache.hadoop.fs.FileSystem;%0Aimport org.apache.hadoop.fs.FSInputStream;%0A%0Apublic class GTFSInputStream extends FSInputStream %7B%0A%0A%0A    public long getPos() throws IOException %7B%0A        return 0;%0A    %7D%0A%0A    public synchronized int available() throws IOException %7B%0A        return 2;%0A    %7D%0A%0A    public synchronized void seek(long targetPos) throws IOException %7B%0A%0A    %7D%0A%0A    public synchronized boolean seekToNewSource(long targetPos) throws IOException %7B%0A        return false;%0A    %7D%0A%0A    public synchronized int read() throws IOException %7B%0A        /*%0A        if (kfsChannel == null) %7B%0A            throw new IOException(%22File closed%22);%0A        %7D%0A        byte b%5B%5D = new byte%5B1%5D;%0A        int res = read(b, 0, 1);%0A        if (res == 1) %7B%0A          if (statistics != null) %7B%0A            statistics.incrementBytesRead(1);%0A          %7D%0A          return b%5B0%5D & 0xff;%0A        %7D%0A        */%0A        return -1;%0A    %7D%0A%0A    public synchronized int read(byte b%5B%5D, int off, int len) throws IOException %7B%0A        /*%0A        if (kfsChannel == null) %7B%0A            throw new IOException(%22File closed%22);%0A        %7D%0A        int res;%0A%0A        res = kfsChannel.read(ByteBuffer.wrap(b, off, len));%0A        // Use -1 to signify EOF%0A        if (res == 0)%0A            return -1;%0A        if (statistics != null) %7B%0A          statistics.incrementBytesRead(res);%0A        %7D%0A        return res;%0A        */%0A        return -1;%0A    %7D%0A%0A    public synchronized void close() throws IOException %7B%0A%0A    %7D%0A%0A    public boolean markSupported() %7B%0A        return false;%0A    %7D%0A%0A    public void mark(int readLimit) %7B%0A        // Do nothing%0A    %7D%0A%0A    public void reset() throws IOException %7B%0A        throw new IOException(%22Mark not supported%22);%0A    %7D%0A%7D%0A

Add InputStream