Codota Logo
SeekableLineReaderIterator
Code IndexAdd Codota to your IDE (free)

How to use
SeekableLineReaderIterator
in
org.archive.util.binsearch

Best Java code snippets using org.archive.util.binsearch.SeekableLineReaderIterator (Showing top 20 results out of 315)

  • Common ways to obtain SeekableLineReaderIterator
private void myMethod () {
SeekableLineReaderIterator s =
  • Codota IconSeekableLineReaderFactory seekableLineReaderFactory;new SeekableLineReaderIterator(seekableLineReaderFactory.get())
  • Smart code suggestions by Codota
}
origin: org.netpreserve.commons/commons-web

public CachedStringIterator(SeekableLineReader slr, String first, String second) {
  this.slr = slr;
  this.first = first;
  this.second = second;
  if (slr != null) {
    it = new SeekableLineReaderIterator(slr);
  }
}

origin: org.netpreserve.commons/commons-web

public boolean hasNext() {
  if(first != null) {
    return true;
  }
  if(second != null) {
    return true;
  }
  if (it == null) {
    return false;
  }
  return it.hasNext();
}
origin: org.netpreserve.commons/commons-web

public String next() {
  if(first != null) {
    String tmp = first;
    first = null;
    return tmp;
  }
  if(second != null) {
    String tmp = second;
    second = null;
    return tmp;
  }
  if (it == null) {
    return null;
  }            
  return it.next();
}
origin: org.netpreserve.openwayback/openwayback-cdx-server

public void loadParamFile() throws IOException {
  SeekableLineReaderFactory fact = null;
  SeekableLineReaderIterator iter = null;
  try {
    fact = GeneralURIStreamFactory.createSeekableStreamFactory(
      paramFile, false);
    iter = new SeekableLineReaderIterator(fact.get());
    paramSet = new HashSet<String>();
    while (iter.hasNext()) {
      String param = iter.next();
      param = param.trim();
      if (param.isEmpty() || param.startsWith("#")) {
        continue;
      }
      // Use only the first word, ignore the rest
      int wordEnd = param.indexOf(delim);
      if (wordEnd > 0) {
        param = param.substring(0, wordEnd);
      }
      paramSet.add(param);
    }
  } finally {
    if (iter != null) {
      iter.close();
    }
    if (fact != null) {
      fact.close();
    }
  }
}
origin: iipc/openwayback

public void loadParamFile() throws IOException {
  SeekableLineReaderFactory fact = null;
  SeekableLineReaderIterator iter = null;
  try {
    fact = GeneralURIStreamFactory.createSeekableStreamFactory(
      paramFile, false);
    iter = new SeekableLineReaderIterator(fact.get());
    paramSet = new HashSet<String>();
    while (iter.hasNext()) {
      String param = iter.next();
      param = param.trim();
      if (param.isEmpty() || param.startsWith("#")) {
        continue;
      }
      // Use only the first word, ignore the rest
      int wordEnd = param.indexOf(delim);
      if (wordEnd > 0) {
        param = param.substring(0, wordEnd);
      }
      paramSet.add(param);
    }
  } finally {
    if (iter != null) {
      iter.close();
    }
    if (fact != null) {
      fact.close();
    }
  }
}
origin: org.netpreserve.commons/webarchive-commons

lines = new SeekableLineReaderIterator(locReaderFactory.get());
while (lines.hasNext()) {
  String line = lines.next();
  lines.close();
origin: org.netpreserve.commons/webarchive-commons

public CachedStringIterator(SeekableLineReader slr, String first, String second) {
  this.slr = slr;
  this.first = first;
  this.second = second;
  if (slr != null) {
    it = new SeekableLineReaderIterator(slr);
  }
}

origin: org.netpreserve.commons/webarchive-commons

public boolean hasNext() {
  if(first != null) {
    return true;
  }
  if(second != null) {
    return true;
  }
  if (it == null) {
    return false;
  }
  return it.hasNext();
}
origin: org.netpreserve.commons/webarchive-commons

public String next() {
  if(first != null) {
    String tmp = first;
    first = null;
    return tmp;
  }
  if(second != null) {
    String tmp = second;
    second = null;
    return tmp;
  }
  if (it == null) {
    return null;
  }            
  return it.next();
}
origin: org.netpreserve.commons/commons-web

lines = new SeekableLineReaderIterator(locReaderFactory.get());
while (lines.hasNext()) {
  String line = lines.next();
  lines.close();
origin: iipc/webarchive-commons

public CachedStringIterator(SeekableLineReader slr, String first, String second) {
  this.slr = slr;
  this.first = first;
  this.second = second;
  if (slr != null) {
    it = new SeekableLineReaderIterator(slr);
  }
}

origin: iipc/webarchive-commons

public boolean hasNext() {
  if(first != null) {
    return true;
  }
  if(second != null) {
    return true;
  }
  if (it == null) {
    return false;
  }
  return it.hasNext();
}
origin: iipc/webarchive-commons

public String next() {
  if(first != null) {
    String tmp = first;
    first = null;
    return tmp;
  }
  if(second != null) {
    String tmp = second;
    second = null;
    return tmp;
  }
  if (it == null) {
    return null;
  }            
  return it.next();
}
origin: iipc/webarchive-commons

lines = new SeekableLineReaderIterator(locReaderFactory.get());
while (lines.hasNext()) {
  String line = lines.next();
  lines.close();
origin: org.netpreserve.commons/commons-web

public CloseableIterator<String> getRecordIterator(final long offset) throws IOException
{
  SeekableLineReader slr = factory.get();
  slr.seek(offset);
  return new SeekableLineReaderIterator(slr);
}
origin: org.netpreserve.commons/webarchive-commons

public CloseableIterator<String> getRecordIterator(final long offset) throws IOException
{
  SeekableLineReader slr = factory.get();
  slr.seek(offset);
  return new SeekableLineReaderIterator(slr);
}
origin: iipc/webarchive-commons

public CloseableIterator<String> getRecordIterator(final long offset) throws IOException
{
  SeekableLineReader slr = factory.get();
  slr.seek(offset);
  return new SeekableLineReaderIterator(slr);
}
origin: iipc/openwayback

protected CloseableIterator<String> createRemoteIter(String urlkey,
    HTTPSeekableLineReader reader) throws IOException {
  CloseableIterator<String> iter = new SeekableLineReaderIterator(reader);
  String cacheInfo = reader.getHeaderValue("X-Page-Cache");
  if ((cacheInfo != null) && cacheInfo.equals("HIT")) {
    if (LOGGER.isLoggable(Level.FINE)) {
      LOGGER.fine("CACHED");
    }
  }
  if (extraSource != null) {
    ZipNumParams params = new ZipNumParams();
    CloseableIterator<String> extraIter = extraSource.getCDXIterator(
        urlkey, urlkey, urlkey, params);
    if (extraIter.hasNext()) {
      SortedCompositeIterator<String> sortedIter = new SortedCompositeIterator<String>(
          MultiCDXInputSource.defaultComparator);
      sortedIter.addIterator(iter);
      sortedIter.addIterator(extraIter);
      return sortedIter;
    }
  }
  return iter;
}
origin: org.netpreserve.openwayback/openwayback-core

protected CloseableIterator<String> createRemoteIter(String urlkey,
    HTTPSeekableLineReader reader) throws IOException {
  CloseableIterator<String> iter = new SeekableLineReaderIterator(reader);
  String cacheInfo = reader.getHeaderValue("X-Page-Cache");
  if ((cacheInfo != null) && cacheInfo.equals("HIT")) {
    if (LOGGER.isLoggable(Level.FINE)) {
      LOGGER.fine("CACHED");
    }
  }
  if (extraSource != null) {
    ZipNumParams params = new ZipNumParams();
    CloseableIterator<String> extraIter = extraSource.getCDXIterator(
        urlkey, urlkey, urlkey, params);
    if (extraIter.hasNext()) {
      SortedCompositeIterator<String> sortedIter = new SortedCompositeIterator<String>(
          MultiCDXInputSource.defaultComparator);
      sortedIter.addIterator(iter);
      sortedIter.addIterator(extraIter);
      return sortedIter;
    }
  }
  return iter;
}
origin: org.netpreserve.commons/webarchive-commons

CloseableIterator<String> slrIter = new SeekableLineReaderIterator(currReader, zipnumIndex.isRequired());
org.archive.util.binsearchSeekableLineReaderIterator

Most used methods

  • <init>
  • close
  • hasNext
  • next

Popular in Java

  • Start an intent from android
  • requestLocationUpdates (LocationManager)
  • scheduleAtFixedRate (Timer)
  • getApplicationContext (Context)
  • KeyStore (java.security)
    This class represents an in-memory collection of keys and certificates. It manages two types of entr
  • PriorityQueue (java.util)
    An unbounded priority Queue based on a priority heap. The elements of the priority queue are ordered
  • ThreadPoolExecutor (java.util.concurrent)
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
  • Stream (java.util.stream)
    A sequence of elements supporting sequential and parallel aggregate operations. The following exampl
  • JLabel (javax.swing)
  • Location (org.springframework.beans.factory.parsing)
    Class that models an arbitrary location in a Resource.Typically used to track the location of proble
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now