Tabnine Logo
InvalidFormatException.<init>
Code IndexAdd Tabnine to your IDE (free)

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

Best Java code snippets using kieker.analysis.plugin.reader.newio.deserializer.InvalidFormatException.<init> (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<init>

Javadoc

Creates a new instance using the given data.

Popular methods of InvalidFormatException

    Popular in Java

    • Making http requests using okhttp
    • scheduleAtFixedRate (Timer)
    • onCreateOptionsMenu (Activity)
    • getOriginalFilename (MultipartFile)
      Return the original filename in the client's filesystem.This may contain path information depending
    • InetAddress (java.net)
      An Internet Protocol (IP) address. This can be either an IPv4 address or an IPv6 address, and in pra
    • Path (java.nio.file)
    • SSLHandshakeException (javax.net.ssl)
      The exception that is thrown when a handshake could not be completed successfully.
    • JTextField (javax.swing)
    • BasicDataSource (org.apache.commons.dbcp)
      Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
    • IsNull (org.hamcrest.core)
      Is the value null?
    • Top Vim 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