code: public static boolean matches(byte[] signature, int length) {
  
          if (length < 3) {
              return false;
          }
  
          if (signature[0] != 'B') {
              return false;
          }
  
          if (signature[1] != 'Z') {
              return false;
          }
  
          if (signature[2] != 'h') {
              return false;
          }
  
          return true;
      }
docs: Checks if the signature matches what is expected for a bzip2 file.
  
  @param signature
  the bytes to check
  @param length
  the number of bytes to check
  @return true, if this stream is a bzip2 compressed stream, false otherwise
  
  @since 1.1