Tabnine Logo
InvalidFormatException
Code IndexAdd Tabnine to your IDE (free)

How to use
InvalidFormatException
in
kieker.analysis.plugin.reader.newio.deserializer

Best Java code snippets using kieker.analysis.plugin.reader.newio.deserializer.InvalidFormatException (Showing top 4 results out of 315)

origin: net.kieker-monitoring/kieker

@Override
public List<IMonitoringRecord> deserializeRecords(final ByteBuffer buffer, final int dataSize) {
  // Check the container identifier
  final int magic = buffer.getInt();
  if (magic != CONTAINER_IDENTIFIER) {
    throw new InvalidFormatException(String.format("Invalid magic value %08x was found.", magic));
  }
  // Check the actual format identifier
  final int formatIdentifier = buffer.getInt();
  if (formatIdentifier != this.getFormatIdentifier()) {
    throw new InvalidFormatException(String.format("An invalid format identifier %08x was found.", formatIdentifier));
  }
  return this.decodeRecords(buffer, (dataSize - HEADER_SIZE));
}
origin: kieker-monitoring/kieker

@Override
public List<IMonitoringRecord> deserializeRecords(final ByteBuffer buffer, final int dataSize) {
  // Check the container identifier
  final int magic = buffer.getInt();
  if (magic != CONTAINER_IDENTIFIER) {
    throw new InvalidFormatException(String.format("Invalid magic value %08x was found.", magic));
  }
  // Check the actual format identifier
  final int formatIdentifier = buffer.getInt();
  if (formatIdentifier != this.getFormatIdentifier()) {
    throw new InvalidFormatException(
        String.format("An invalid format identifier %08x was found.", formatIdentifier));
  }
  return this.decodeRecords(buffer, (dataSize - HEADER_SIZE));
}
origin: net.kieker-monitoring/kieker

private List<IMonitoringRecord> decodeMonitoringRecords(final ByteBuffer buffer, final IRegistry<String> stringRegistry, final int endOffset) {
  final List<IMonitoringRecord> records = new ArrayList<IMonitoringRecord>();
  int currentOffset = buffer.position();
  final CachedRecordFactoryCatalog recordFactoryCatalog = this.cachedRecordFactoryCatalog;
  while (currentOffset < endOffset) {
    final int recordTypeId = buffer.getInt();
    final String recordTypeName = stringRegistry.get(recordTypeId);
    final long loggingTimestamp = buffer.getLong();
    final IRecordFactory<? extends IMonitoringRecord> recordFactory = recordFactoryCatalog.get(recordTypeName);
    final IMonitoringRecord record = recordFactory.create(DefaultValueDeserializer.create(buffer, stringRegistry));
    record.setLoggingTimestamp(loggingTimestamp);
    records.add(record);
    currentOffset = buffer.position();
  }
  // The record data must end exactly at the given end offset
  if (currentOffset != endOffset) {
    throw new InvalidFormatException("Invalid record data found, should have ended at offset " + endOffset + ", but ended at offset " + currentOffset + ".");
  }
  return records;
}
origin: kieker-monitoring/kieker

private List<IMonitoringRecord> decodeMonitoringRecords(final ByteBuffer buffer,
    final ReaderRegistry<String> stringRegistry, final int endOffset) {
  final List<IMonitoringRecord> records = new ArrayList<>();
  int currentOffset = buffer.position();
  final CachedRecordFactoryCatalog recordFactoryCatalog = this.cachedRecordFactoryCatalog;
  while (currentOffset < endOffset) {
    final int recordTypeId = buffer.getInt();
    final String recordTypeName = stringRegistry.get(recordTypeId);
    final long loggingTimestamp = buffer.getLong();
    final IRecordFactory<? extends IMonitoringRecord> recordFactory = recordFactoryCatalog.get(recordTypeName);
    final IMonitoringRecord record = recordFactory
        .create(BinaryValueDeserializer.create(buffer, stringRegistry));
    record.setLoggingTimestamp(loggingTimestamp);
    records.add(record);
    currentOffset = buffer.position();
  }
  // The record data must end exactly at the given end offset
  if (currentOffset != endOffset) {
    throw new InvalidFormatException("Invalid record data found, should have ended at offset " + endOffset
        + ", but ended at offset " + currentOffset + ".");
  }
  return records;
}
kieker.analysis.plugin.reader.newio.deserializerInvalidFormatException

Javadoc

Denotes that an invalid data format was found.

Most used methods

  • <init>
    Creates a new instance using the given data.

Popular in Java

  • Making http requests using okhttp
  • onCreateOptionsMenu (Activity)
  • compareTo (BigDecimal)
  • findViewById (Activity)
  • Table (com.google.common.collect)
    A collection that associates an ordered pair of keys, called a row key and a column key, with a sing
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • SQLException (java.sql)
    An exception that indicates a failed JDBC operation. It provides the following information about pro
  • Logger (org.apache.log4j)
    This is the central class in the log4j package. Most logging operations, except configuration, are d
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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