Examples of Hasher


Examples of com.google_voltpatches.common.hash.Hasher

   * Hashes the contents of this byte source using the given hash function.
   *
   * @throws IOException if an I/O error occurs in the process of reading from this source
   */
  public HashCode hash(HashFunction hashFunction) throws IOException {
    Hasher hasher = hashFunction.newHasher();
    copyTo(Funnels.asOutputStream(hasher));
    return hasher.hash();
  }
View Full Code Here

Examples of jersey.repackaged.com.google.common.hash.Hasher

   * Hashes the contents of this byte source using the given hash function.
   *
   * @throws IOException if an I/O error occurs in the process of reading from this source
   */
  public HashCode hash(HashFunction hashFunction) throws IOException {
    Hasher hasher = hashFunction.newHasher();
    copyTo(Funnels.asOutputStream(hasher));
    return hasher.hash();
  }
View Full Code Here

Examples of org.eclipse.jgit.treewalk.filter.ByteArraySet.Hasher

      // egit/jgit: 8
      // git: 5
      // linux kernel: 13
      // eclipse.platform.ui: 7
      max = pathFilters[0].pathRaw;
      Hasher hasher = new Hasher(null, 0);
      for (PathFilter pf : pathFilters) {
        hasher.init(pf.pathRaw, pf.pathRaw.length);
        while (hasher.hasNext()) {
          int hash = hasher.nextHash();
          if (hasher.hasNext())
            prefixes.addIfAbsent(pf.pathRaw, hasher.length(), hash);
        }
        fullpaths.addIfAbsent(pf.pathRaw, pf.pathRaw.length,
            hasher.getHash());
        if (compare(max, pf.pathRaw) < 0)
          max = pf.pathRaw;
      }
      // Adjust max for the git sort order. A path we compare
      // with may end with a slash at any position (but the
View Full Code Here

Examples of org.eclipse.jgit.treewalk.filter.ByteArraySet.Hasher

    @Override
    public boolean include(final TreeWalk walker) {

      byte[] rp = walker.getRawPath();
      Hasher hasher = new Hasher(rp, walker.getPathLength());
      while (hasher.hasNext()) {
        int hash = hasher.nextHash();
        if (fullpaths.contains(rp, hasher.length(), hash))
          return true;
        if (!hasher.hasNext())
          if (prefixes.contains(rp, hasher.length(), hash))
            return true;
      }

      final int cmp = walker.isPathPrefix(max, max.length);
      if (cmp > 0)
View Full Code Here

Examples of org.gradle.api.internal.hash.Hasher

    public IncrementalCompilerFactory(FileOperations fileOperations, String compileDisplayName, CleaningJavaCompiler cleaningJavaCompiler,
                                      List<Object> source, CompileCaches compileCaches, IncrementalTaskInputsInternal inputs) {
        this.inputs = inputs;
        //bunch of services that enable incremental java compilation.
        Hasher hasher = new DefaultHasher(); //TODO SF use caching hasher
        ClassDependenciesAnalyzer analyzer = new CachingClassDependenciesAnalyzer(new DefaultClassDependenciesAnalyzer(), hasher, compileCaches.getClassAnalysisCache());
        JarSnapshotter jarSnapshotter = new CachingJarSnapshotter(hasher, analyzer, compileCaches.getJarSnapshotCache(), inputs.getInputFilesSnapshot());

        JarClasspathSnapshotMaker jarClasspathSnapshotMaker = new JarClasspathSnapshotMaker(compileCaches.getLocalJarClasspathSnapshotStore(), new JarClasspathSnapshotFactory(jarSnapshotter), new ClasspathJarFinder(fileOperations));
        CompilationSourceDirs sourceDirs = new CompilationSourceDirs(source);
View Full Code Here

Examples of org.openbel.framework.common.util.Hasher

            reportable.error("Unable to read file");
            reportable.error("Reason: " + e.getMessage());
            bail(GENERAL_FAILURE);
        }

        Hasher hasher = Hasher.INSTANCE;
        try {
            String generatedhash = hasher.hashValue(hashContents);
            reportable.output("Checksum: " + generatedhash);
        } catch (Exception e) {
            reportable.error("Unable to created checksum");
            reportable.error("Reason: " + e.getMessage());
            bail(GENERAL_FAILURE);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.