Code example for FileChannel

Methods: mapsize

	private int offset;
	public MemoryMappedBitStream(FileInputStream inputStream) throws IOException {
		super(inputStream); = inputStream.getChannel();
		byteBuffer =, 0, channel.size());
		offset = 0;
    protected int readByte() throws IOException { 
    	return byteBuffer.get() & 0xFF; 
    public String readString() throws IOException {
        final int l = readInt();
        byte[] b = new byte[l];
        offset += l;
        return new String(b);
Connect your IDE to all the code out there  Get Codota for Java