Class

xerial.larray

MappedLByteArray

Related Doc: package larray

Permalink

class MappedLByteArray extends RawByteArray[Byte]

Memory-mapped LByteArray

Source
MappedLByteArray.scala
Linear Supertypes
RawByteArray[Byte], LArray[Byte], WritableByteChannel, Channel, Closeable, AutoCloseable, LSeq[Byte], LIterable[Byte], AnyRef, Any
Type Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. MappedLByteArray
  2. RawByteArray
  3. LArray
  4. WritableByteChannel
  5. Channel
  6. Closeable
  7. AutoCloseable
  8. LSeq
  9. LIterable
  10. AnyRef
  11. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new MappedLByteArray(f: File, offset: Long = 0, size: Long = 1, mode: MMapMode = MMapMode.READ_WRITE)(implicit alloc: MemoryAllocator)

    Permalink

Type Members

  1. type Repr = LArray[Byte]

    Permalink
    Definition Classes
    LIterable
  2. class SlidingIterator extends AbstractLIterator[LSeq.Repr]

    Permalink
    Definition Classes
    LIterable

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. def ++(other: LSeq[Byte]): Repr

    Permalink

    Create a new array that concatenates two arrays

    Create a new array that concatenates two arrays

    Definition Classes
    LIterable
  4. def +:(elem: Byte): Repr

    Permalink

    Copy of thie array with an element prepended.

    Copy of thie array with an element prepended.

    elem

    the prepended element.

    returns

    a new array consisting ofall elements of this array preceded by the new elem.

    Definition Classes
    LIterable
  5. def /:[B](z: B)(op: (B, Byte) ⇒ B): B

    Permalink

    fold left

    fold left

    B

    the result type of the binary operator

    z

    the start value

    op

    the binary operator

    returns

    the result of inserting op between consecutive elements of this array, going left to right with the start value z on the left:

    op(...op(op(z, x1), x2), ..., xn)))
    Definition Classes
    LIterable
  6. def :+(elem: Byte): Repr

    Permalink

    Copy of this array with an element appended.

    Copy of this array with an element appended.

    elem

    the appended element

    returns

    a new array consisting of all elements of this array follwed by the new elem

    Definition Classes
    LIterable
  7. def :\[B](z: B)(op: (Byte, B) ⇒ B): B

    Permalink

    fold right

    fold right

    B

    the result type of the binary operator

    z

    the start value

    op

    the binary operator

    returns

    the result of inserting op between consecutive elements of this array, going right to left with the start value z on the right:

    op(x1, op(x2, ..., op(xn, z)...))
    Definition Classes
    LIterable
  8. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  9. def addString(b: StringBuilder, start: String, sep: String, end: String): StringBuilder

    Permalink
    Definition Classes
    LIterable
  10. val address: Long

    Permalink

    Raw-memory address of this array

    Raw-memory address of this array

    Definition Classes
    MappedLByteArrayLSeq
  11. def aggregate[B](z: B)(seqop: (B, Byte) ⇒ B, combop: (B, B) ⇒ B): B

    Permalink
    Definition Classes
    LIterable
  12. def apply(i: Long): Byte

    Permalink

    Retrieve an element

    Retrieve an element

    i

    index

    returns

    the element value

    Definition Classes
    MappedLByteArrayLSeq
  13. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  14. def byteLength: Long

    Permalink

    Byte length of this array.

    Byte length of this array.

    Definition Classes
    LSeq
  15. def clear(): Unit

    Permalink

    Clear the contents of the array.

    Clear the contents of the array. It simply fills the array with zero bytes.

    Definition Classes
    RawByteArrayLArray
  16. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  17. def close(): Unit

    Permalink

    Close the memory mapped file.

    Close the memory mapped file. To ensure the written data is saved in the file, call flush before closing

    Definition Classes
    MappedLByteArrayLArray → Channel → Closeable → AutoCloseable
  18. def collect[B](pf: PartialFunction[Byte, B]): LIterator[B]

    Permalink

    Builds a new collection by applying a partial function to all elments of this array on which the function is defined.

    Builds a new collection by applying a partial function to all elments of this array on which the function is defined.

    Definition Classes
    LIterable
  19. def collectFirst[B](pf: PartialFunction[Byte, B]): Option[B]

    Permalink

    Finds the first element of this array on which the given partial function is defined, and applies the partial function to it.

    Finds the first element of this array on which the given partial function is defined, and applies the partial function to it.

    B

    return type

    pf

    partial function

    returns

    an option value containing pf applied to the first value for which the function is defined, or None if not exists.

    Definition Classes
    LIterable
  20. def concat(other: LSeq[Byte]): Repr

    Permalink

    Create a new array that concatenates two arrays

    Create a new array that concatenates two arrays

    Definition Classes
    LIterable
  21. def contains(elem: Byte): Boolean

    Permalink
    Definition Classes
    LIterable
  22. def copyTo[B](srcOffset: Long, dst: RawByteArray[B], dstOffset: Long, blen: Long): Unit

    Permalink

    Copy the contents of this sequence into the target LByteArray

    Copy the contents of this sequence into the target LByteArray

    blen

    the byte length to copy

    Definition Classes
    RawByteArrayLSeq
  23. def copyTo(dst: LByteArray, dstOffset: Long): Unit

    Permalink

    Copy the contents of this LSeq[A] into the target LByteArray

    Copy the contents of this LSeq[A] into the target LByteArray

    Definition Classes
    RawByteArrayLSeq
  24. def copyToArray[B >: Byte](xs: LArray[B], start: Long, len: Long): Unit

    Permalink
    Definition Classes
    LIterable
  25. def copyToArray[B >: Byte](xs: Array[B], start: Int, len: Int): Unit

    Permalink
    Definition Classes
    LIterable
  26. var cursor: Long

    Permalink
    Attributes
    protected
    Definition Classes
    RawByteArray
  27. def drop(n: Long): Repr

    Permalink
    Definition Classes
    LIterable
  28. def dropWhile(p: (Byte) ⇒ Boolean): Repr

    Permalink
    Definition Classes
    LIterable
  29. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  30. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  31. def exists(p: (Byte) ⇒ Boolean): Boolean

    Permalink
    Definition Classes
    LIterable
  32. def filter(pred: (Byte) ⇒ Boolean): LIterator[Byte]

    Permalink
    Definition Classes
    LIterable
  33. def filterNot(pred: (Byte) ⇒ Boolean): LIterator[Byte]

    Permalink
    Definition Classes
    LIterable
  34. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  35. def find(p: (Byte) ⇒ Boolean): Option[Byte]

    Permalink
    Definition Classes
    LIterable
  36. def flatMap[B](f: (Byte) ⇒ LIterator[B]): LIterator[B]

    Permalink
    Definition Classes
    LIterable
  37. def flush: Unit

    Permalink

    Forces any changes made to this buffer to be written to the file

  38. def fold[A1 >: Byte](z: A1)(op: (A1, A1) ⇒ A1): A1

    Permalink
    Definition Classes
    LIterable
  39. def foldLeft[B](z: B)(op: (B, Byte) ⇒ B): B

    Permalink
    Definition Classes
    LIterable
  40. def foldRight[B](z: B)(op: (Byte, B) ⇒ B): B

    Permalink
    Definition Classes
    LIterable
  41. def forall(p: (Byte) ⇒ Boolean): Boolean

    Permalink
    Definition Classes
    LIterable
  42. def foreach[U](f: (Byte) ⇒ U): Unit

    Permalink
    Definition Classes
    LIterable
  43. def free: Unit

    Permalink

    Release the memory of LArray.

    Release the memory of LArray. After calling this method, the results of calling the other methods becomes undefined or might cause JVM crash.

    Definition Classes
    MappedLByteArrayLArray
  44. def getByte(offset: Long): Byte

    Permalink
    Definition Classes
    LSeq
    Annotations
    @inline()
  45. def getChar(offset: Long): Char

    Permalink
    Definition Classes
    LSeq
    Annotations
    @inline()
  46. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  47. def getDouble(offset: Long): Double

    Permalink
    Definition Classes
    LSeq
    Annotations
    @inline()
  48. def getFloat(offset: Long): Float

    Permalink
    Definition Classes
    LSeq
    Annotations
    @inline()
  49. def getInt(offset: Long): Int

    Permalink
    Definition Classes
    LSeq
    Annotations
    @inline()
  50. def getLong(offset: Long): Long

    Permalink
    Definition Classes
    LSeq
    Annotations
    @inline()
  51. def getShort(offset: Long): Short

    Permalink
    Definition Classes
    LSeq
    Annotations
    @inline()
  52. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  53. def head: Byte

    Permalink
    Definition Classes
    LIterable
  54. def indexOf[B >: Byte](elem: B): Long

    Permalink
    Definition Classes
    LIterable
  55. def indexWhere(p: (Byte) ⇒ Boolean, from: Long): Long

    Permalink
    Definition Classes
    LIterable
  56. def init: Repr

    Permalink
    Definition Classes
    LIterable
  57. def isEmpty: Boolean

    Permalink

    Tests whether this sequence is empty

    Tests whether this sequence is empty

    Definition Classes
    LIterable
  58. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  59. def isOpen(): Boolean

    Permalink
    Definition Classes
    LArray → Channel
  60. def iterator: LIterator[Byte]

    Permalink

    Creates a new iterator over all elements contained in this collection

    Creates a new iterator over all elements contained in this collection

    Definition Classes
    LIterable
  61. def ji: Iterable[Byte]

    Permalink

    Provides the Iterable interface for Java

    Provides the Iterable interface for Java

    Definition Classes
    LIterable
  62. def last: Byte

    Permalink
    Definition Classes
    LIterable
  63. def lastIndexWhere(p: (Byte) ⇒ Boolean, end: Int): Int

    Permalink
    Definition Classes
    LIterable
  64. def length: Long

    Permalink
    Definition Classes
    LIterable
  65. def map[B](f: (Byte) ⇒ B): LIterator[B]

    Permalink
    Definition Classes
    LIterable
  66. def mkString: String

    Permalink
    Definition Classes
    LIterable
  67. def mkString(sep: String): String

    Permalink
    Definition Classes
    LIterable
  68. def mkString(start: String, sep: String, end: String): String

    Permalink
    Definition Classes
    LIterable
  69. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  70. def newBuilder: LByteArrayBuilder

    Permalink
    Attributes
    protected[this]
    Definition Classes
    MappedLByteArrayLIterable
  71. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  72. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  73. def partition(p: (Byte) ⇒ Boolean): (LIterator[Byte], LIterator[Byte])

    Permalink
    Definition Classes
    LIterable
  74. def prefixLength(p: (Byte) ⇒ Boolean): Long

    Permalink
    Definition Classes
    LIterable
  75. def putByte(offset: Long, v: Byte): Byte

    Permalink
    Definition Classes
    LArray
    Annotations
    @inline()
  76. def putChar(offset: Long, v: Char): Char

    Permalink
    Definition Classes
    LArray
    Annotations
    @inline()
  77. def putDouble(offset: Long, v: Double): Double

    Permalink
    Definition Classes
    LArray
    Annotations
    @inline()
  78. def putFloat(offset: Long, v: Float): Float

    Permalink
    Definition Classes
    LArray
    Annotations
    @inline()
  79. def putInt(offset: Long, v: Int): Int

    Permalink
    Definition Classes
    LArray
    Annotations
    @inline()
  80. def putLong(offset: Long, v: Long): Long

    Permalink
    Definition Classes
    LArray
    Annotations
    @inline()
  81. def putShort(offset: Long, v: Short): Short

    Permalink
    Definition Classes
    LArray
    Annotations
    @inline()
  82. def readFromArray(src: Array[Byte], srcOffset: Int, destOffset: Long, length: Int): Int

    Permalink

    Read the contents from a given source buffer

    Read the contents from a given source buffer

    src

    source buffer

    srcOffset

    byte offset in the source buffer

    destOffset

    byte offset from the destination address

    length

    byte length to read from the source

    Definition Classes
    RawByteArray
  83. def reduce[A1 >: Byte](op: (A1, A1) ⇒ A1): A1

    Permalink
    Definition Classes
    LIterable
  84. def reduceLeft[B >: Byte](op: (B, Byte) ⇒ B): B

    Permalink
    Definition Classes
    LIterable
  85. def reduceLeftOption[B >: Byte](op: (B, Byte) ⇒ B): Option[B]

    Permalink
    Definition Classes
    LIterable
  86. def reduceOption[A1 >: Byte](op: (A1, A1) ⇒ A1): Option[A1]

    Permalink
    Definition Classes
    LIterable
  87. def reduceRight[B >: Byte](op: (Byte, B) ⇒ B): B

    Permalink
    Definition Classes
    LIterable
  88. def reduceRightOption[B >: Byte](op: (Byte, B) ⇒ B): Option[B]

    Permalink
    Definition Classes
    LIterable
  89. def release: Unit

    Permalink

    Release the memory of LArray.

    Release the memory of LArray. After calling this mehtod, thr results of calling the other methods becomes undefined or might cause JVM crash.

    Definition Classes
    LArray
  90. def reverse[A]: Repr

    Permalink
    Definition Classes
    LIterable
  91. def reverseIterator: LIterator[Byte]

    Permalink
    Definition Classes
    LIterable
  92. def sameElements[B >: Byte](that: LIterable[B]): Boolean

    Permalink
    Definition Classes
    LIterable
  93. def saveTo(f: File): File

    Permalink

    Save to a file.

    Save to a file.

    Definition Classes
    LSeq
  94. def scanLeft[B](z: B)(op: (B, Byte) ⇒ B): LIterator[B]

    Permalink
    Definition Classes
    LIterable
  95. def segmentLength(p: (Byte) ⇒ Boolean, from: Long): Long

    Permalink
    Definition Classes
    LIterable
  96. val size: Long

    Permalink

    Element size of this array

    Element size of this array

    returns

    size of this array

    Definition Classes
    MappedLByteArrayLSeq
  97. def slice(from: Long, until: Long): LArray[Byte]

    Permalink
    Definition Classes
    LIterable
  98. def slice(from: Long): LArray[Byte]

    Permalink
    Definition Classes
    LIterable
  99. def sliding(size: Long, step: Long): LIterator[Repr]

    Permalink

    Groups elemnts in fixed size blocks by passing a 'sliding window' over them.

    Groups elemnts in fixed size blocks by passing a 'sliding window' over them.

    size

    the number of elements per group

    step

    the distance between the first elements of successive groups

    returns

    An itertor producing group of elements.

    Definition Classes
    LIterable
  100. def sliding(size: Int): LIterator[Repr]

    Permalink

    Groups elements in fixed size blocks by passing a 'sliding window' over them

    Groups elements in fixed size blocks by passing a 'sliding window' over them

    size

    the number of elements per group

    returns

    An iterator producing group of elements.

    Definition Classes
    LIterable
  101. def span(p: (Byte) ⇒ Boolean): (Repr, Repr)

    Permalink
    Definition Classes
    LIterable
  102. def splitAt(n: Long): (Repr, Repr)

    Permalink
    Definition Classes
    LIterable
  103. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  104. def tail: LArray[Byte]

    Permalink
    Definition Classes
    LIterable
  105. def take(n: Long): Repr

    Permalink
    Definition Classes
    LIterable
  106. def takeRight(n: Long): Repr

    Permalink
    Definition Classes
    LIterable
  107. def takeWhile(p: (Byte) ⇒ Boolean): Repr

    Permalink
    Definition Classes
    LIterable
  108. def toArray[A1 >: Byte](implicit arg0: ClassTag[A1]): Array[A1]

    Permalink

    Creates a copy of this array in the form of the standard Scala Array

    Creates a copy of this array in the form of the standard Scala Array

    Definition Classes
    LIterable
  109. def toDirectByteBuffer: Array[ByteBuffer]

    Permalink

    Create a sequence of DirectByteBuffer that projects LArray contents

    Create a sequence of DirectByteBuffer that projects LArray contents

    returns

    sequence of java.nio.ByteBuffer

    Definition Classes
    LSeq
  110. def toInputStream: InputStream

    Permalink

    Create an input stream for reading LArray byte contents

    Create an input stream for reading LArray byte contents

    Definition Classes
    RawByteArray
  111. def toIterator: LIterator[Byte]

    Permalink
    Definition Classes
    LIterable
  112. def toLSeq: LSeq[Byte]

    Permalink

    Wraps with immutable interface

    Wraps with immutable interface

    Definition Classes
    LArray
  113. def toString(): String

    Permalink
    Definition Classes
    LArray → AnyRef → Any
  114. def update(i: Long, v: Byte): Byte

    Permalink

    Update an element

    Update an element

    i

    index to be updated

    v

    value to set

    returns

    the value

    Definition Classes
    MappedLByteArrayLArray
  115. def view(from: Long, to: Long): LByteArrayView

    Permalink

    Create a shallow copy (view) of LArray

    Create a shallow copy (view) of LArray

    Definition Classes
    MappedLByteArrayLArray
  116. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  117. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  118. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  119. def withFilter(p: (Byte) ⇒ Boolean): LIterator[Byte]

    Permalink
    Definition Classes
    LIterable
  120. def write(src: ByteBuffer): Int

    Permalink

    Write the contents of ByteBuffer to this array.

    Write the contents of ByteBuffer to this array. This method increments the internal cursor.

    Definition Classes
    RawByteArrayLArray → WritableByteChannel
  121. def writeToArray(srcOffset: Long, dest: Array[Byte], destOffset: Int, length: Int): Int

    Permalink

    Write the contents of this array to the destination buffer

    Write the contents of this array to the destination buffer

    srcOffset

    byte offset

    dest

    destination array

    destOffset

    offset in the destination array

    length

    the byte length to write

    returns

    written byte length

    Definition Classes
    RawByteArray
  122. def zip[B](that: LIterable[B]): LIterator[(Byte, B)]

    Permalink
    Definition Classes
    LIterable
  123. def zipAll[B, A1 >: Byte, B1 >: B](that: LIterable[B], thisElem: A1, thatElem: B1): LIterator[(A1, B1)]

    Permalink
    Definition Classes
    LIterable
  124. def zipWithIndex: LIterator[(Byte, Long)]

    Permalink
    Definition Classes
    LIterable

Inherited from RawByteArray[Byte]

Inherited from LArray[Byte]

Inherited from WritableByteChannel

Inherited from Channel

Inherited from Closeable

Inherited from AutoCloseable

Inherited from LSeq[Byte]

Inherited from LIterable[Byte]

Inherited from AnyRef

Inherited from Any

Ungrouped