@NonNull
    @Override
    public ByteBuffer toBuffer() {
        ByteBuffer byteBuffer;
        FileInputStream fis = null;
        FileChannel channel = null;
        try {
            fis = new FileInputStream(mFile);
            channel = fis.getChannel();
            byteBuffer = ByteBuffer.allocate(fis.available());
            channel.read(byteBuffer);
            byteBuffer.flip();
        } catch (IOException e) {
            byteBuffer = ByteBuffer.allocate(0);
        } finally {
            NetBareUtils.closeQuietly(channel);
            NetBareUtils.closeQuietly(fis);
        }
        return byteBuffer;
    }
Constructs a stream by a tiny file.

@param file A tiny file.
@throws IOException
netbare-injector/src/main/java/com/github/megatronking/netbare/stream/TinyFileStream.java