import org.eclipse.linuxtools.ctf.core.event.types.StructDefinition;
import org.eclipse.linuxtools.internal.ctf.core.event.CTFCallsiteComparator;
import org.eclipse.linuxtools.internal.ctf.core.event.metadata.exceptions.ParseException;
-import org.eclipse.linuxtools.internal.ctf.core.trace.StreamInputPacketIndex;
/**
* A CTF trace on the file system.
/** map of all the event types */
private final Map<Long, HashMap<Long, IEventDeclaration>> eventDecs = new HashMap<Long, HashMap<Long, IEventDeclaration>>();
- /** map of all the indexes */
- private final Map<StreamInput, StreamInputPacketIndex> indexes = new HashMap<StreamInput, StreamInputPacketIndex>();
-
/** Callsite helpers */
private CTFCallsiteComparator ctfCallsiteComparator = new CTFCallsiteComparator();
return eventDecs.get(streamId);
}
- /**
- * Gets an index for a given StreamInput
- *
- * @param id
- * the StreamInput
- * @return The index
- */
- StreamInputPacketIndex getIndex(StreamInput id) {
- if (!indexes.containsKey(id)) {
- indexes.put(id, new StreamInputPacketIndex());
- }
- return indexes.get(id);
- }
-
/**
* Gets an event Declaration hashmap for a given StreamInput
*
}
/**
- * Method majortIsSet is the major version number set?
+ * Method majorIsSet is the major version number set?
*
* @return boolean is the major set?
*/
- public boolean majortIsSet() {
+ public boolean majorIsSet() {
return major != null;
}
fc = fis.getChannel();
/* Map one memory page of 4 kiB */
- byteBuffer = fc.map(MapMode.READ_ONLY, 0, Math.min((int) fc.size(), 4096));
+ byteBuffer = fc.map(MapMode.READ_ONLY, 0, (int) Math.min(fc.size(), 4096L));
} catch (IOException e) {
/* Shouldn't happen at this stage if every other check passed */
throw new CTFReaderException(e);