public synchronized boolean startsWith()

in src/main/java/com/googlesource/gerrit/plugins/web/LookAheadFileInputStream.java [78:87]


  public synchronized boolean startsWith(String includeVirtualPrefix) throws IOException {
    mark(includeVirtualPrefix.length());
    try {
      byte[] cmp = new byte[includeVirtualPrefix.length()];
      super.read(cmp);
      return Arrays.equals(includeVirtualPrefix.getBytes(), cmp);
    } finally {
      reset();
    }
  }