Class StreamUtils


  • @Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class)
    public final class StreamUtils
    extends Object
    Utility methods for handling files.
    • Constructor Detail

      • StreamUtils

        public StreamUtils()
    • 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)