Class StreamUtils
- java.lang.Object
-
- com.cloudbees.jenkins.support.util.StreamUtils
-
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public final class StreamUtils extends Object
Utility methods for handling files.
-
-
Field Summary
Fields Modifier and Type Field Description static int
DEFAULT_PROBE_SIZE
-
Constructor Summary
Constructors Constructor Description StreamUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
closeQuietly(Closeable closeable)
Close resources quietly.static boolean
isNonWhitespaceControlCharacter(byte[] b)
Check if the content of a byte array is binarystatic boolean
isNonWhitespaceControlCharacter(ByteBuffer head)
Check if the content of a ByteBuffer is binary
-
-
-
Field Detail
-
DEFAULT_PROBE_SIZE
public static final int DEFAULT_PROBE_SIZE
- See Also:
- Constant Field Values
-
-
Method Detail
-
isNonWhitespaceControlCharacter
public static boolean isNonWhitespaceControlCharacter(@NonNull byte[] b)
Check if the content of a byte array is binary- Parameters:
b
- byte array to check- Returns:
- true if the content is binary (Non-white Control Characters)
-
isNonWhitespaceControlCharacter
public static boolean isNonWhitespaceControlCharacter(@NonNull ByteBuffer head)
Check if the content of a ByteBuffer is binary- Parameters:
head
- ByteBuffer to check- Returns:
- true if the content is binary (Non-white Control Characters)
-
-