Class ChunksBuffer

    • Constructor Detail

      • ChunksBuffer

        public ChunksBuffer()
    • Method Detail

      • channelCount

        public final int channelCount()
        Specified by:
        channelCount in class Binary
      • clear

        public final void clear()
        Specified by:
        clear in interface Chunk
      • readMemory

        public void readMemory​(long address,
                               long length)
        It is completely the caller's responsibility that the passed array contains a valid [LEN][TID][OID][data] byte sequence.
        Specified by:
        readMemory in interface MemoryRangeReader
      • storeEntityHeader

        public final long storeEntityHeader​(long entityContentLength,
                                            long entityTypeId,
                                            long entityObjectId)
        Description copied from class: Binary
        Writes the header (etc...).

        Returns a memory address that is guaranteed to be safe for writing len bytes. Writing any more bytes will lead to unpredictable results, from (most likely) destroying the byte stream's consistency up to crashing the VM immediately or at some point in the future.

        DO NOT WRITE MORE THEN len BYTES TO THE RETURNED ADDRESS!

        Specified by:
        storeEntityHeader in class Binary
      • isEmpty

        public final boolean isEmpty()
        Specified by:
        isEmpty in interface Chunk
      • totalLength

        public final long totalLength()
        Specified by:
        totalLength in interface Chunk
      • modifyLoadItem

        public final void modifyLoadItem​(long entityContentAddress,
                                         long entityTotalLength,
                                         long entityTypeId,
                                         long entityObjectId)
        Specified by:
        modifyLoadItem in class Binary