MCPcopy Create free account
hub / github.com/jankotek/mapdb / copyTo

Method copyTo

src/main/java/org/mapdb/volume/ByteBufferVol.java:100–109  ·  view source on GitHub ↗
(long inputOffset, Volume target, long targetOffset, long size)

Source from the content-addressed store, hash-verified

98 }
99
100 @Override
101 public void copyTo(long inputOffset, Volume target, long targetOffset, long size) {
102 final ByteBuffer b1 =getSlice(inputOffset).duplicate();
103 final int bufPos = (int) (inputOffset& sliceSizeModMask);
104
105 b1.position(bufPos);
106 //TODO size>Integer.MAX_VALUE
107 b1.limit((int) (bufPos+size));
108 target.putData(targetOffset, b1);
109 }
110
111 @Override public void getData(final long offset, final byte[] src, int srcPos, int srcSize){
112 final ByteBuffer b1 = getSlice(offset).duplicate();

Callers

nothing calls this directly

Calls 2

getSliceMethod · 0.95
putDataMethod · 0.45

Tested by

no test coverage detected