Codota Logo
IndexElement.getStart
Code IndexAdd Codota to your IDE (free)

How to use
getStart
method
in
uk.ac.ebi.pride.tools.jmzreader.model.IndexElement

Best Java code snippets using uk.ac.ebi.pride.tools.jmzreader.model.IndexElement.getStart (Showing top 6 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
BufferedReader b =
  • Codota IconInputStream in;new BufferedReader(new InputStreamReader(in))
  • Codota IconReader in;new BufferedReader(in)
  • Codota IconFile file;new BufferedReader(new FileReader(file))
  • Smart code suggestions by Codota
}
origin: uk.ac.ebi.pride.tools/dta-parser

accessFile.seek(indexElement.getStart());
int size = indexElement.getSize();
origin: uk.ac.ebi.pride.tools/pkl-parser

file.seek(indexElement.getStart());
byte[] buffer = new byte[indexElement.getSize()];
file.read(buffer);
origin: uk.ac.ebi.pride.tools/ms2-parser

inputFile.seek(indexElement.getStart());
byte[] bytes = new byte[indexElement.getSize()];
inputFile.read(bytes);
origin: uk.ac.ebi.pride.tools/apl-parser

accFile.seek(indexElement.getStart());
accFile.read(byteBuffer);
String ms2Buffer = new String(byteBuffer);
origin: uk.ac.ebi.pride.tools/mzxml-parser

public static Spectrum getIndexedSpectrum(File sourcefile, uk.ac.ebi.pride.tools.jmzreader.model.IndexElement indexElement) throws JMzReaderException {
  RandomAccessFile access = null;
  try {
    // read the XML from the file
    access = new RandomAccessFile(sourcefile, "r");
    // create the byte buffer
    byte[] bytes = new byte[indexElement.getSize()];
    // move to the position in the file
    access.seek(indexElement.getStart());
    // read the snipplet
    access.read(bytes);
    // create and return the string
    String snipplet = new String(bytes);
    MzXMLUnmarshaller localUnmarshaller = MzXMLUnmarshallerFactory.getInstance().initializeUnmarshaller();
    Scan scan = localUnmarshaller.unmarshal(snipplet, MzXmlElement.SCAN_LEVEL1);
    return new MzXMLSpectrum(scan);
  } catch (Exception e) {
    throw new JMzReaderException("Failed to read from mzXML file.", e);
  } finally {
    if (access != null) {
      try {
        access.close();
      } catch (IOException e) {
        // ignore
      }
    }
  }
}
origin: uk.ac.ebi.pride.tools/mzdata-parser

byte[] buffer = new byte[indexElement.getSize()];
accessFile.seek(indexElement.getStart());
accessFile.read(buffer);
uk.ac.ebi.pride.tools.jmzreader.modelIndexElementgetStart

Javadoc

Returns the starting position (in bytes) of the indexed object.

Popular methods of IndexElement

  • getSize
    Returns the size of the indexed object in the file.

Popular in Java

  • Start an intent from android
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • notifyDataSetChanged (ArrayAdapter)
  • compareTo (BigDecimal)
    Compares this BigDecimal with the specified BigDecimal. Two BigDecimal objects that are equal in val
  • InputStreamReader (java.io)
    An InputStreamReader is a bridge from byte streams to character streams: It reads bytes and decodes
  • Proxy (java.net)
    This class represents proxy server settings. A created instance of Proxy stores a type and an addres
  • Socket (java.net)
    Provides a client-side TCP socket.
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • LinkedHashMap (java.util)
    Hash table and linked list implementation of the Map interface, with predictable iteration order. Th
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
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