Packages

c

org.apache.spark.io

NioBufferedFileInputStream

final class NioBufferedFileInputStream extends InputStream

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 java.io.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.

Source
NioBufferedFileInputStream.java
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. NioBufferedFileInputStream
  2. InputStream
  3. Closeable
  4. AutoCloseable
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new NioBufferedFileInputStream(file: File)
  2. new NioBufferedFileInputStream(file: File, bufferSizeInBytes: Int)

Value Members

  1. def available(): Int
    Definition Classes
    NioBufferedFileInputStream → InputStream
    Annotations
    @Override()
  2. def close(): Unit
    Definition Classes
    NioBufferedFileInputStream → InputStream → Closeable → AutoCloseable
    Annotations
    @Override()
  3. def mark(arg0: Int): Unit
    Definition Classes
    InputStream
  4. def markSupported(): Boolean
    Definition Classes
    InputStream
  5. def read(b: Array[Byte], offset: Int, len: Int): Int
    Definition Classes
    NioBufferedFileInputStream → InputStream
    Annotations
    @Override()
  6. def read(): Int
    Definition Classes
    NioBufferedFileInputStream → InputStream
    Annotations
    @Override()
  7. def read(arg0: Array[Byte]): Int
    Definition Classes
    InputStream
    Annotations
    @throws(classOf[java.io.IOException])
  8. def readAllBytes(): Array[Byte]
    Definition Classes
    InputStream
    Annotations
    @throws(classOf[java.io.IOException])
  9. def readNBytes(arg0: Array[Byte], arg1: Int, arg2: Int): Int
    Definition Classes
    InputStream
    Annotations
    @throws(classOf[java.io.IOException])
  10. def readNBytes(arg0: Int): Array[Byte]
    Definition Classes
    InputStream
    Annotations
    @throws(classOf[java.io.IOException])
  11. def reset(): Unit
    Definition Classes
    InputStream
    Annotations
    @throws(classOf[java.io.IOException])
  12. def skip(n: Long): Long
    Definition Classes
    NioBufferedFileInputStream → InputStream
    Annotations
    @Override()
  13. def skipNBytes(arg0: Long): Unit
    Definition Classes
    InputStream
    Annotations
    @throws(classOf[java.io.IOException])
  14. def transferTo(arg0: OutputStream): Long
    Definition Classes
    InputStream
    Annotations
    @throws(classOf[java.io.IOException])