Class FileUtils
- java.lang.Object
-
- io.github.lukehutch.fastclasspathscanner.utils.FileUtils
-
public class FileUtils extends Object
-
-
Constructor Summary
Constructors Constructor Description FileUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static InputStream
byteBufferToInputStream(ByteBuffer byteBuffer)
Produce an InputStream from a ByteBuffer.static String
getCurrDirPathStr()
Get current dir (without resolving symlinks), and normalize path by calling FastPathResolver.resolve().static boolean
isClassfile(String path)
Returns true if path has a .class extension, ignoring case.static byte[]
readAllBytes(InputStream inputStream, long fileSize, LogNode log)
Read all the bytes in an InputStream.
-
-
-
Method Detail
-
getCurrDirPathStr
public static String getCurrDirPathStr()
Get current dir (without resolving symlinks), and normalize path by calling FastPathResolver.resolve().
-
readAllBytes
public static byte[] readAllBytes(InputStream inputStream, long fileSize, LogNode log) throws IOException
Read all the bytes in an InputStream.- Throws:
IOException
-
isClassfile
public static boolean isClassfile(String path)
Returns true if path has a .class extension, ignoring case.
-
byteBufferToInputStream
public static InputStream byteBufferToInputStream(ByteBuffer byteBuffer)
Produce an InputStream from a ByteBuffer. From: https://stackoverflow.com/questions/4332264/wrapping-a-bytebuffer-with-an-inputstream/6603018#6603018
-
-