Package org.apache.spark.io
Class NioBufferedFileInputStream
Object
java.io.InputStream
org.apache.spark.io.NioBufferedFileInputStream
- All Implemented Interfaces:
- Closeable,- AutoCloseable
InputStream implementation which uses direct buffer
 to read a file to avoid extra copy of data between Java and
 native memory which happens when using BufferedInputStream.
 Unfortunately, this is not something already available in JDK,
 sun.nio.ch.ChannelInputStream supports reading a file using nio,
 but does not support buffering.- 
Constructor SummaryConstructors
- 
Method SummaryMethods inherited from class java.io.InputStreammark, markSupported, nullInputStream, read, readAllBytes, readNBytes, readNBytes, reset, skipNBytes, transferTo
- 
Constructor Details- 
NioBufferedFileInputStream- Throws:
- IOException
 
- 
NioBufferedFileInputStream- Throws:
- IOException
 
 
- 
- 
Method Details- 
read- Specified by:
- readin class- InputStream
- Throws:
- IOException
 
- 
read- Overrides:
- readin class- InputStream
- Throws:
- IOException
 
- 
available- Overrides:
- availablein class- InputStream
- Throws:
- IOException
 
- 
skip- Overrides:
- skipin class- InputStream
- Throws:
- IOException
 
- 
close- Specified by:
- closein interface- AutoCloseable
- Specified by:
- closein interface- Closeable
- Overrides:
- closein class- InputStream
- Throws:
- IOException
 
 
-