public final class MemorySlice extends Object implements Comparable<MemorySlice>
MemorySegment.| 构造器和说明 |
|---|
MemorySlice(MemorySegment segment,
int offset,
int length) |
| 限定符和类型 | 方法和说明 |
|---|---|
int |
compareTo(MemorySlice other) |
byte[] |
copyBytes() |
boolean |
equals(Object o) |
byte[] |
getHeapMemory() |
int |
hashCode() |
int |
length() |
int |
offset() |
byte |
readByte(int position) |
int |
readInt(int position) |
long |
readLong(int position) |
MemorySegment |
segment() |
MemorySlice |
slice(int index,
int length) |
MemorySliceInput |
toInput() |
static MemorySlice |
wrap(byte[] bytes) |
static MemorySlice |
wrap(MemorySegment segment) |
public MemorySlice(MemorySegment segment, int offset, int length)
public MemorySegment segment()
public int offset()
public int length()
public MemorySlice slice(int index, int length)
public byte readByte(int position)
public int readInt(int position)
public long readLong(int position)
public byte[] getHeapMemory()
public byte[] copyBytes()
public MemorySliceInput toInput()
public static MemorySlice wrap(byte[] bytes)
public static MemorySlice wrap(MemorySegment segment)
public int compareTo(MemorySlice other)
compareTo 在接口中 Comparable<MemorySlice>Copyright © 2023–2024 The Apache Software Foundation. All rights reserved.