Class CharsetUtilities
- java.lang.Object
-
- jetbrains.buildServer.nio.charset.CharsetUtilities
-
public abstract class CharsetUtilities extends Object
- Since:
- 9.1
- Author:
- Andrey Shcheglov <mailto:andrey.shcheglov@jetbrains.com>
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Charset
detectCharset(File path)
static boolean
isBinary(File input)
Returnstrue
ifinput
is binary,false
otherwise.
-
-
-
Method Detail
-
isBinary
@NotOomeSafe("Files.readAllBytes()") public static boolean isBinary(@NotNull File input) throws IOException
Returns
true
ifinput
is binary,false
otherwise. Note that for UTF-16 encoded files this method will always returntrue
, so UTF-16 detection should be invoked before this method is called.- Returns:
true
ifinput
is binary,false
otherwise.- Throws:
IOException
-
-