Package org.apache.maven.buildcache.hash
Class CloseableBuffer
java.lang.Object
org.apache.maven.buildcache.hash.CloseableBuffer
- All Implemented Interfaces:
AutoCloseable
CloseableBuffer https://stackoverflow.com/a/54046774
-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()static CloseableBufferdirectBuffer(int capacity) Do not use buffer after closestatic CloseableBuffermappedBuffer(FileChannel channel, FileChannel.MapMode mode)
-
Method Details
-
directBuffer
-
mappedBuffer
public static CloseableBuffer mappedBuffer(FileChannel channel, FileChannel.MapMode mode) throws IOException - Throws:
IOException
-
getBuffer
Do not use buffer after close -
close
public void close()- Specified by:
closein interfaceAutoCloseable
-