Class BinaryUtils$

java.lang.Object
csw.config.api.commons.BinaryUtils$

public class BinaryUtils$ extends Object
Utils for binary data
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final BinaryUtils$
    Static reference to the singleton instance of this Scala object.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    isBinary(scala.collection.immutable.Seq<akka.util.ByteString> byteStrings)
    Identifies if the sequence of ByteString can be treated as binary
    boolean
    isNotText(byte[] bytes)
    Identifies if the byte array can be treated as text or not by checking if binary content is more than 15% i.e.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • MODULE$

      public static final BinaryUtils$ MODULE$
      Static reference to the singleton instance of this Scala object.
  • Constructor Details

    • BinaryUtils$

      public BinaryUtils$()
  • Method Details

    • isBinary

      public boolean isBinary(scala.collection.immutable.Seq<akka.util.ByteString> byteStrings)
      Identifies if the sequence of ByteString can be treated as binary

      Parameters:
      byteStrings - a sequence of ByteString to be tested for binary content
      Returns:
      boolean value indicating if the the byteString represents binary content
    • isNotText

      public boolean isNotText(byte[] bytes)
      Identifies if the byte array can be treated as text or not by checking if binary content is more than 15% i.e. ASCII printable content is more than 85%

      Parameters:
      bytes - a connection to resolve to with its registered location
      Returns:
      boolean value indicating if the bytes represents text content