congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
IndexElement.getSize
Code IndexAdd Tabnine to your IDE (free)

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

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

origin: uk.ac.ebi.pride.tools/dta-parser

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

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

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

byte[] byteBuffer = new byte[indexElement.getSize()];
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()];
uk.ac.ebi.pride.tools.jmzreader.modelIndexElementgetSize

Javadoc

Returns the size of the indexed object in the file.

Popular methods of IndexElement

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

Popular in Java

  • Updating database using SQL prepared statement
  • getExternalFilesDir (Context)
  • addToBackStack (FragmentTransaction)
  • onCreateOptionsMenu (Activity)
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • PrintStream (java.io)
    Fake signature of an existing Java class.
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • Comparator (java.util)
    A Comparator is used to compare two objects to determine their ordering with respect to each other.
  • GregorianCalendar (java.util)
    GregorianCalendar is a concrete subclass of Calendarand provides the standard calendar used by most
  • Locale (java.util)
    Locale represents a language/country/variant combination. Locales are used to alter the presentatio
  • Top 12 Jupyter Notebook Extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now