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 Details

  • Constructor Details

    • StreamUtils

      public StreamUtils()
  • Method Details

    • 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)
    • closeQuietly

      public static void closeQuietly(Closeable closeable)
      Close resources quietly.
      Parameters:
      closeable - the Closeable