Packages that use DataFormatException
Package
Description
Provides a standard way for reading and writing messages transferred over I2P so that the recipient has an authenticated mechanism to reply to the sender.
Internal implementation of the I2P client SDK - the client side of the Invisible Internet Client Protocol (I2CP), separating implementation from the interfaces in
net.i2p.client. Implementation of a TCP-like (reliable, authenticated, in order) set of sockets for communicating over the IP-like (unreliable, unauthenticated, unordered) I2P messages.
Core cryptographic primitives used throughout I2P: symmetric ciphers (AES, ChaCha20), hashes (SHA-1, SHA-256, SHA-384, SHA-512), HMAC and HKDF key derivation, the ElGamal and DSA/EdDSA/RedDSA engines, key and certificate utilities, and the entropy harvester.
Common data structures used by the I2P protocols: Destination, LeaseSet, PublicKey, Signature, Certificate and their friends.
The Invisible Internet Client Protocol (I2CP) allows applications simplified access to I2P network without requiring them to deal with the issues involved with the Invisible Internet Network Protocol (I2NP).
Low-level messages sent between routers - the Invisible Internet Network Protocol (I2NP).
Router-specific data structures: RouterInfo and RouterIdentity with their transport addresses and capabilities, router key generation, and the optionally password-protected router private key file.
Implementation of preconfigured tunnels for clients and servers, including special-purpose tunnels for IRC, SOCKS, HTTP and streaming.
SOCKS 4, 4a and 5 server implementations exposing I2P client tunnels to SOCKS clients.
Router-specific cryptography: ElGamal+AES garlic encryption (ElGamalAESEngine), session key and tag caching for repeated peer communication (TransientSessionKeyManager), router-family shared keys (FamilyKeyCrypto), and the ratchet and pqc subpackages.
The Double Ratchet with X25519 key agreement and ECIES hybrid encryption, used by the NTCP2 and SSU transports for session encryption.
Garlic message creation, parsing and handling, and the outbound message jobs: one-shot sends, source routing and delivery status handling.
The router's default naming service, BlockfileNamingService, backed by the Metanotion BlockFile database (
net.metanotion) in hostsdb.dat. The Kademlia distributed hash table (DHT) network database: lookup, store and explore jobs, the data store, the floodfill variants, and lookup throttling.
The I2P startup package loads configuration when I2P is started.
NTCP2, the TCP transport: framed, ratchet-encrypted and mutually authenticated connections between routers.
SSU2, the UDP transport: datagram sessions with Holepunch peer discovery, plus the older SSU compatibility code.
The SAM bridge: a simple text protocol server letting applications in any language use I2P streaming and datagram sessions without implementing the Invisible Internet Client Protocol (I2CP).
BitTorrent distributed hash table (DHT) implementation following the Mainline protocol, for trackerless peer discovery.
Uses of DataFormatException in net.i2p.client.datagram
Methods in net.i2p.client.datagram that throw DataFormatExceptionModifier and TypeMethodDescriptionstatic Datagram2Datagram2.load(I2PAppContext ctx, I2PSession session, byte[] dgram) Load an I2P repliable datagram and verify the signature.static Datagram3Datagram3.load(I2PAppContext ctx, I2PSession session, byte[] dgram) Load an I2P repliable datagram3.voidI2PDatagramDissector.loadI2PDatagram(byte[] dgram) Load an I2P repliable datagram into the dissector.static byte[]Datagram2.make(I2PAppContext ctx, I2PSession session, byte[] payload, Hash tohash) Make a repliable I2P datagram2 containing the specified payload.static byte[]Datagram2.make(I2PAppContext ctx, I2PSession session, byte[] payload, Hash tohash, Properties options) Make a repliable I2P datagram2 containing the specified payload.static byte[]Datagram3.make(I2PAppContext ctx, I2PSession session, byte[] payload) Make a repliable I2P datagram3 containing the specified payload.static byte[]Datagram3.make(I2PAppContext ctx, I2PSession session, byte[] payload, Properties options) Make a repliable I2P datagram3 containing the specified payload.Uses of DataFormatException in net.i2p.client.impl
Methods in net.i2p.client.impl that throw DataFormatExceptionModifier and TypeMethodDescriptionprivate voidI2PSessionImpl.readDestination(InputStream destKeyStream) Load up the destKeyFile for our Destination, PrivateKey, and SigningPrivateKey.Uses of DataFormatException in net.i2p.client.streaming.impl
Methods in net.i2p.client.streaming.impl that throw DataFormatExceptionModifier and TypeMethodDescriptionprivate voidPcapWriter.wrt(Packet pkt, Connection con, boolean isInbound) Write a packet to the pcap file in the proper format.Uses of DataFormatException in net.i2p.crypto
Methods in net.i2p.crypto that throw DataFormatExceptionModifier and TypeMethodDescriptionvoidSHA1Hash.readBytes(InputStream in) Read the hash data from a stream.private voidSU3File.verifyHeader(InputStream in) Throws if verify fails.Uses of DataFormatException in net.i2p.data
Methods in net.i2p.data that throw DataFormatExceptionModifier and TypeMethodDescriptionstatic byte[]DataHelper.copyOfRange(byte[] src, int from, int to) Copy a range of a byte array into a new array, mirroringArrays.copyOfRange(byte[], int, int)but throwing DataFormatException on invalid bounds so callers in the data layer can handle it with their existing exception flow.static CertificateCertificate.create(byte[] data, int off) If null, P256 key, or Ed25519 key cert, return immutable static instance, else create new.static CertificateCertificate.create(InputStream in) If null, P256 key, or Ed25519 key cert, return immutable static instance, else create new.static DestinationDestination.create(InputStream in) Pull from cache or return new.private voidEncryptedLeaseSet.decrypt(PrivateKey csk) Throws IllegalStateException if not initialized.private voidLeaseSet.decrypt(SessionKey key) Decrypt the leases, except for the last one which is partially padding.private voidLeaseSet.encryp(SessionKey key) Encrypts the lease set in seven steps.voidDataStructure.fromBase64(String data) Load the structure from the provided base64 string.voidDataStructureImpl.fromBase64(String data) voidSimpleDataStructure.fromBase64(String data) Data from the base64 string.voidDataStructure.fromByteArray(byte[] data) Loads structure from the data providedvoidDataStructureImpl.fromByteArray(byte[] data) voidDateAndFlags.fromByteArray(byte[] data) Overridden for efficiency.voidSimpleDataStructure.fromByteArray(byte[] data) Does the same thing asSimpleDataStructure.setData(byte[])but null not allowed.static DateDataHelper.fromDate(byte[] src, int offset) Read a date (8-byte timestamp) from a byte array.static intDataHelper.fromProperties(byte[] source, int offset, Properties target) Reads the props from the byte array and puts them in the Properties target See readProperties() for the format.protected abstract byte[]DatabaseEntry.getBytes()Returns the raw payload data, excluding the signature, to be signed byDatabaseEntry.sign(SigningPrivateKey).PrivateKeyFile.getDestination()If the destination is not set, read it in from the file.intCertificate.NullCert.readBytes(byte[] source, int offset) Prevent mutation of the immutable null certificate.voidCertificate.NullCert.readBytes(InputStream in) Prevent mutation of the immutable null certificate.intCertificate.readBytes(byte[] source, int offset) Reads the certificate from the source array.voidCertificate.readBytes(InputStream in) Reads the certificate from an input stream.voidDataStructure.readBytes(InputStream in) Load up the current object with data from the given stream.voidDateAndFlags.readBytes(InputStream in) Load up the current object with data from the given stream.voidEncryptedLeaseSet.readBytes(InputStream in) This does NOT validate the signature.voidHash.readBytes(InputStream in) Reads the hash from an input stream.intKeyCertificate.ECDSA256Cert.readBytes(byte[] source, int offset) Prevent mutation of the immutable certificate.voidKeyCertificate.ECDSA256Cert.readBytes(InputStream in) Prevent mutation of the immutable certificate.intKeyCertificate.Ed25519Cert.readBytes(byte[] source, int offset) Prevent mutation of the immutable certificate.voidKeyCertificate.Ed25519Cert.readBytes(InputStream in) Prevent mutation of the immutable certificate.intKeyCertificate.X25519_Ed25519Cert.readBytes(byte[] source, int offset) Prevent mutation of the immutable certificate.voidKeyCertificate.X25519_Ed25519Cert.readBytes(InputStream in) Prevent mutation of the immutable certificate.voidKeysAndCert.readBytes(InputStream in) Reads the keys and certificate from an input stream.voidLease.readBytes(InputStream in) Reads the lease from an input stream.voidLease2.readBytes(InputStream in) voidLeaseSet.readBytes(InputStream in) This does NOT validate the signature.voidLeaseSet2.readBytes(InputStream in) This does NOT validate the signature.voidMetaLease.readBytes(InputStream in) Reads the lease from an input stream.voidMetaLeaseSet.readBytes(InputStream in) This does NOT validate the signature.voidPayload.readBytes(InputStream in) Reads this payload from an input stream (4-byte length-prefixed data).voidSimpleDataStructure.readBytes(InputStream in) Data read from the stream.voidTunnelId.readBytes(InputStream in) Read the tunnel ID from a stream.static DateDataHelper.readDate(InputStream in) Read in a date from the stream as specified by the I2P data structure spec.protected voidEncryptedLeaseSet.readHeader(InputStream in) Overridden because we have a blinded key, not a dest.protected voidLeaseSet2.readHeader(InputStream in) Read the LeaseSet2 header from a stream.static longDataHelper.readLong(InputStream rawStream, int numBytes) Read the stream for an integer as defined by the I2P data structure specification.protected voidEncryptedLeaseSet.readOfflineBytes(InputStream in) Overridden because we have a blinded key, not a dest.protected voidLeaseSet2.readOfflineBytes(InputStream in) Read the offline signing section from a stream.static PropertiesDataHelper.readProperties(InputStream rawStream) Read a mapping from the stream, as defined by the I2P data structure spec, and store it into a Properties object.static PropertiesDataHelper.readProperties(InputStream rawStream, Properties props) Ditto, load into an existing propertiesstatic PropertiesDataHelper.readProperties(InputStream rawStream, Properties props, boolean enforceOrder) Ditto, load into an existing propertiesvoidDatabaseEntry.sign(SigningPrivateKey key) Sign the structure using the supplied signing key.voidEncryptedLeaseSet.sign(SigningPrivateKey key) Sign the structure using the supplied signing key.voidEncryptedLeaseSet.sign(SigningPrivateKey key, int authType, List<? extends SimpleDataStructure> clientKeys) Sign the structure using the supplied signing key.voidLeaseSet2.sign(SigningPrivateKey key) Sign the structure using the supplied signing key.Certificate.toKeyCertificate()Up-convert this to a KeyCertificate.static intDataHelper.toProperties(byte[] target, int offset, Properties props) Writes the props to the byte array, sorted See readProperties() for the format.static byte[]DataHelper.toProperties(Properties opts) Writes the props to returned byte array, not sorted (unless the opts param is an OrderedProperties) Strings will be UTF-8 encoded in the byte array.voidPrivateKeyFile.write()Write the keys to the file.protected voidLeaseSet2.writeBody(OutputStream out) Without sig.voidCertificate.writeBytes(OutputStream out) voidDataStructure.writeBytes(OutputStream out) Write out the data structure to the stream, using the format defined in the I2P data structure specification.voidDateAndFlags.writeBytes(OutputStream out) Write out the data structure to the stream, using the format defined in the I2P data structure specification.voidKeysAndCert.writeBytes(OutputStream out) Writes the keys and certificate to an output stream.voidLease.writeBytes(OutputStream out) Writes the lease to an output stream.voidLease2.writeBytes(OutputStream out) voidLeaseSet.writeBytes(OutputStream out) This does NOT validate the signature.voidLeaseSet2.writeBytes(OutputStream out) Including sig.voidMetaLease.writeBytes(OutputStream out) Writes the lease to an output stream.voidPayload.writeBytes(OutputStream out) Writes this payload to an output stream (4-byte length-prefixed data).voidSimpleDataStructure.writeBytes(OutputStream out) Writes the data to the output stream.voidTunnelId.writeBytes(OutputStream out) Write the tunnel ID to a stream.protected voidEncryptedLeaseSet.writeBytesWithoutSig(OutputStream out) BeforeEncryptedLeaseSet.encrypt(SessionKey)is called, the inner leaseset.protected voidLeaseSet2.writeBytesWithoutSig(OutputStream out) Without sig.protected voidMetaLeaseSet.writeBytesWithoutSig(OutputStream out) Without sig.static voidDataHelper.writeDate(OutputStream out, Date date) Write out a date to the stream as specified by the I2P data structure spec.protected voidEncryptedLeaseSet.writeHeader(OutputStream out) Overridden because we have a blinded key, not a dest.protected voidLeaseSet2.writeHeader(OutputStream out) Write the LeaseSet2 header to a stream.static voidDataHelper.writeLong(OutputStream rawStream, int numBytes, long value) Write an integer as defined by the I2P data structure specification to the stream.protected voidEncryptedLeaseSet.writeOfflineBytes(OutputStream out) Overridden because we have a blinded key, not a dest.protected voidLeaseSet2.writeOfflineBytes(OutputStream out) Write the offline signing section to a stream.static voidDataHelper.writeProperties(OutputStream rawStream, Properties props) Write a mapping to the stream, as defined by the I2P data structure spec, and store it into a Properties object.static voidDataHelper.writeProperties(OutputStream rawStream, Properties props, boolean utf8) Writes the props to the stream, sorted by property name.static voidDataHelper.writeProperties(OutputStream rawStream, Properties props, boolean utf8, boolean sort) Writes the props to the stream, sorted by property name if sort == true or if props is an OrderedProperties.static voidDataHelper.writeString(OutputStream out, String string) Write out a string to the stream as specified by the I2P data structure spec.static voidDataHelper.writeStringUTF8(OutputStream out, String string) Write out a string to the stream as specified by the I2P data structure spec.(package private) voidSigningPublicKey.writeTruncatedBytes(OutputStream out) Write the data up to a max of 128 bytes.private voidEncryptedLeaseSet.x_decrypt(PrivateKey csk) Throws IllegalStateException if not initialized.Constructors in net.i2p.data that throw DataFormatExceptionModifierConstructorDescriptionAlternative constructor which takes a base64 string representation.Creates an immutable ElG/ECDSA-P256 certificate.Creates an immutable ElG/Ed25519 certificate.KeyCertificate(byte[] payload) 4 bytes minimum if non-null.KeyCertificate(Certificate cert) Up-convert a cert to this class.PrivateKey(String base64Data) Private key of the default type from a string of base64 data.Public key from a string of base64 data.SigningPrivateKey(String base64Data) Signing private key from a string of base64 data.SigningPublicKey(String base64Data) Signing public key from a string of base64 data.Alternative constructor which takes a base64 string representation.Create from an existing Dest.Creates an immutable X25519/Ed25519 certificate.Uses of DataFormatException in net.i2p.data.i2cp
Methods in net.i2p.data.i2cp that throw DataFormatExceptionModifier and TypeMethodDescriptionvoidAbuseReason.readBytes(InputStream in) Reads the abuse reason from a stream.voidAbuseSeverity.readBytes(InputStream in) Reads the severity level from a stream.voidI2CPMessageImpl.readBytes(InputStream in) Read the message from the stream, wrapping I2CPMessageException inDataFormatException.voidMessageId.readBytes(InputStream in) Read the message ID from a stream.voidSessionConfig.readBytes(InputStream rawConfig) Reads the session config from a stream.voidSessionId.readBytes(InputStream in) Read the session ID from a stream.voidSessionConfig.signSessionConfig(SigningPrivateKey signingKey) Sign the structure using the supplied private key.voidAbuseReason.writeBytes(OutputStream out) Writes the abuse reason to a stream.voidAbuseSeverity.writeBytes(OutputStream out) Writes the severity level to a stream.voidI2CPMessageImpl.writeBytes(OutputStream out) Write the message to the stream, wrapping I2CPMessageException in DataFormatException.voidMessageId.writeBytes(OutputStream out) Write the message ID to a stream.voidSessionConfig.writeBytes(OutputStream out) Writes the session config to a stream.voidSessionId.writeBytes(OutputStream out) Writes the session ID to a stream.Uses of DataFormatException in net.i2p.data.i2np
Methods in net.i2p.data.i2np that throw DataFormatExceptionModifier and TypeMethodDescriptionintGarlicClove.readBytes(byte[] source, int offset) Read the clove from a byte array.voidGarlicClove.readBytesRatchet(byte[] source, int offset, int len) Short format for ECIES-Ratchet, saves 22 bytes.Constructors in net.i2p.data.i2np that throw DataFormatExceptionModifierConstructorDescriptionBuildRequestRecord(RouterContext ctx, PrivateKey ourKey, EncryptedBuildRecord encryptedRecord) Decrypts an encrypted build request record.Uses of DataFormatException in net.i2p.data.router
Methods in net.i2p.data.router that throw DataFormatExceptionModifier and TypeMethodDescriptionprotected byte[]RouterInfo.getBytes()Write out the raw payload of the routerInfo, excluding the signature.RouterPrivateKeyFile.getRouterIdentity()Read it in from the file.voidRouterAddress.readBytes(InputStream in) Restores the expiration field, which is accepted but must be all zeros: it is ignored on readin and a non-zero value fails the signature check.voidRouterInfo.readBytes(InputStream in) This does NOT validate the signature.voidRouterInfo.readBytes(InputStream in, boolean verifySig) If verifySig is true, this validates the signature while reading in, and throws a DataFormatException if the sig is invalid.voidRouterAddress.writeBytes(OutputStream out) Write the cost, expiration, transport style, and options.voidRouterInfo.writeBytes(OutputStream out) This does NOT validate the signature.private voidRouterInfo.writeDataBytes(OutputStream out) Write out the raw payload of the routerInfo, excluding the signature.Uses of DataFormatException in net.i2p.i2ptunnel
Methods in net.i2p.i2ptunnel that throw DataFormatExceptionModifier and TypeMethodDescriptionprivate static DestinationI2PTunnel.destFromName(String name, String i2cpHost, String i2cpPort, boolean isSSL, String user, String pw) Resolve a destination from a name or Base64 string.Uses of DataFormatException in net.i2p.i2ptunnel.socks
Methods in net.i2p.i2ptunnel.socks that throw DataFormatExceptionModifier and TypeMethodDescriptionprivate I2PSocketSOCKS5Server.connectToDestination(I2PSOCKSTunnel t, DataOutputStream out) Connect to the requested destination via I2P, an outproxy plugin, or a configured outproxy.Uses of DataFormatException in net.i2p.router.crypto
Methods in net.i2p.router.crypto that throw DataFormatExceptionModifier and TypeMethodDescriptionbyte[]ElGamalAESEngine.decrypt(byte[] data, PrivateKey targetPrivateKey, SessionKeyManager keyManager) Decrypt the message using the given private key and using tags from the specified key manager.private byte[]ElGamalAESEngine.decryptExistingSession(byte[] data, SessionKey key, PrivateKey targetPrivateKey, Set<SessionTag> foundTags, SessionKey usedKey, SessionKey foundKey) Scenario 2: The data begins with 32 byte session tag, which also serves as the preIV.byte[]ElGamalAESEngine.decryptFast(byte[] data, PrivateKey targetPrivateKey, SessionKeyManager keyManager) Tags only.byte[]ElGamalAESEngine.decryptSlow(byte[] data, PrivateKey targetPrivateKey, SessionKeyManager keyManager) Full ElG only.Uses of DataFormatException in net.i2p.router.crypto.ratchet
Methods in net.i2p.router.crypto.ratchet that throw DataFormatExceptionModifier and TypeMethodDescriptionECIESAEADEngine.decrypt(byte[] data, PrivateKey ecKey, PrivateKey pqKey, MuxedPQSKM keyManager) Try to decrypt the message with one or both of the given private keys.ECIESAEADEngine.decrypt(byte[] data, PrivateKey elgKey, PrivateKey ecKey, MuxedSKM keyManager) Try to decrypt the message with one or both of the given private keys.ECIESAEADEngine.decrypt(byte[] data, PrivateKey targetPrivateKey, RatchetSKM keyManager) Decrypt the message using the given private key and using tags from the specified key manager.MuxedEngine.decrypt(byte[] data, PrivateKey elgKey, PrivateKey ecKey, MuxedSKM keyManager) Decrypt the message with the given private keys.MuxedPQEngine.decrypt(byte[] data, PrivateKey ecKey, PrivateKey pqKey, MuxedPQSKM keyManager) Decrypt the message with the given private keys.private CloveSetECIESAEADEngine.decryptExistingSession(byte[] tag, byte[] data, SessionKeyAndNonce key, PrivateKey _targetPrivateKey, RatchetSKM keyManager) Scenario 3: Existing Session Message.(package private) CloveSetECIESAEADEngine.decryptFast(byte[] data, PrivateKey targetPrivateKey, RatchetSKM keyManager) NSR/ES only.private CloveSetECIESAEADEngine.decryptNewSession(byte[] data, PrivateKey targetPrivateKey, RatchetSKM keyManager) Scenario 1: New Session Messageprivate CloveSetECIESAEADEngine.decryptNewSession_N(byte[] data, PrivateKey targetPrivateKey, RatchetSKM keyManager) Scenario 1A: New Session Message Anonymous.private CloveSetECIESAEADEngine.decryptNewSessionReply(byte[] tag, byte[] data, HandshakeState oldState, RatchetSKM keyManager) Scenario 2: New Session Reply Message(package private) CloveSetECIESAEADEngine.decryptSlow(byte[] data, PrivateKey targetPrivateKey, RatchetSKM keyManager) NS only.voidECIESAEADEngine.PLCallback.gotDateTime(long time) Process a datetime field from the payload.voidRatchetPayload.PayloadCallback.gotDateTime(long time) Receive a datetime block.voidRatchetPayload.PayloadCallback.gotOptions(byte[] options, boolean isHandshake) Receive an options block.static intRatchetPayload.processPayload(I2PAppContext ctx, RatchetPayload.PayloadCallback cb, byte[] payload, int off, int length, boolean isHandshake) Process a ratchet payload, calling the callback for each block found.private CloveSetECIESAEADEngine.x_decrypt(byte[] data, PrivateKey targetPrivateKey, RatchetSKM keyManager) Decrypts a received message into cloves.private CloveSetECIESAEADEngine.x_decryptFast(byte[] data, PrivateKey targetPrivateKey, RatchetSKM keyManager) NSR/ES only.private CloveSetECIESAEADEngine.x_decryptSlow(byte[] data, PrivateKey targetPrivateKey, RatchetSKM keyManager) NS only.private CloveSetECIESAEADEngine.xx_decryptFast(byte[] tag, RatchetSessionTag st, SessionKeyAndNonce key, byte[] data, PrivateKey targetPrivateKey, RatchetSKM keyManager) NSR/ES only.Uses of DataFormatException in net.i2p.router.message
Methods in net.i2p.router.message that throw DataFormatExceptionModifier and TypeMethodDescriptionGarlicMessageParser.readCloveSet(byte[] data, int offset) ElGamal only.Uses of DataFormatException in net.i2p.router.naming
Methods in net.i2p.router.naming that throw DataFormatExceptionModifier and TypeMethodDescriptionprivate static StringBlockfileNamingService.readLongString(ByteArrayInputStream in) Same as DataHelper.readString, except that strings up to 4K bytes are allowed.static PropertiesBlockfileNamingService.readProperties(ByteArrayInputStream in) Same as DataHelper.readProperties, UTF-8, unsorted, except that values may be up to 4K bytes.private static voidBlockfileNamingService.writeLongStringUTF8(ByteArrayOutputStream out, String string) Same as DataHelper.writeStringUTF8, except that strings up to 4K bytes are allowed.private static voidBlockfileNamingService.writeProperties(ByteArrayOutputStream rawStream, Properties p) Same as DataHelper.writeProperties, UTF-8, unsorted, except that values may be up to 4K bytes.Uses of DataFormatException in net.i2p.router.networkdb.kademlia
Methods in net.i2p.router.networkdb.kademlia that throw DataFormatExceptionModifier and TypeMethodDescriptionprivate BlindDataBlindCache.fromPersistentString(String line) Format: sigtype,bsigtype,authtype,timestamp,b64 pubkey,[b64 secret],[b64 auth privkey],[b64 dest]Uses of DataFormatException in net.i2p.router.startup
Methods in net.i2p.router.startup that throw DataFormatExceptionModifier and TypeMethodDescriptionstatic LoadRouterInfoJob.KeyDataLoadRouterInfoJob.readKeyData(File rkf1, File rkf2) Read key data from the specified files.Uses of DataFormatException in net.i2p.router.transport.ntcp
Methods in net.i2p.router.transport.ntcp that throw DataFormatExceptionModifier and TypeMethodDescriptionvoidNTCP2Payload.PayloadCallback.gotDateTime(long time) Receive the data/time block.voidNTCP2Payload.PayloadCallback.gotOptions(byte[] options, boolean isHandshake) Receive an options block, the peer's padding negotiation parameters.voidInboundEstablishState.gotRI(RouterInfo ri, boolean isHandshake, boolean flood) Validates Alice's RouterInfo and extracts the static key for comparison.voidNTCP2Payload.PayloadCallback.gotRI(RouterInfo ri, boolean isHandshake, boolean flood) Receive a RouterInfo block.voidNTCPConnection.NTCP2ReadState.gotRI(RouterInfo ri, boolean isHandshake, boolean flood) / PayloadCallbacksprivate static voidNTCP2Payload.processDateTime(NTCP2Payload.PayloadCallback cb, byte[] payload, int i, int len) Parse a DATETIME block (exactly 4 bytes) and report it to the callback.private static voidNTCP2Payload.processOptions(NTCP2Payload.PayloadCallback cb, byte[] payload, int i, int len, boolean isHandshake) Copy an OPTIONS block and report it to the callback.static intNTCP2Payload.processPayload(I2PAppContext ctx, NTCP2Payload.PayloadCallback cb, byte[] payload, int off, int length, boolean isHandshake) Incoming payload.private static voidNTCP2Payload.processRouterInfo(I2PAppContext ctx, NTCP2Payload.PayloadCallback cb, byte[] payload, int i, int len, boolean isHandshake) Deserialize a ROUTERINFO block (a 1-byte flag then the RouterInfo) and report it to the callback.Constructors in net.i2p.router.transport.ntcp that throw DataFormatExceptionModifierConstructorDescriptionNTCPConnection(RouterContext ctx, NTCPTransport transport, RouterIdentity remotePeer, RouterAddress remAddr, int version) Create an outbound unconnected NTCP connection.Uses of DataFormatException in net.i2p.router.transport.udp
Subclasses of DataFormatException in net.i2p.router.transport.udpModifier and TypeClassDescription(package private) static classFor throwing out of gotRI().Methods in net.i2p.router.transport.udp with parameters of type DataFormatExceptionModifier and TypeMethodDescription(package private) static RouterInfoSSU2Payload.recoverRouterInfo(I2PAppContext ctx, ByteArrayInputStream bais, DataFormatException dfe) Alternate verification of a RouterInfo whose strict parse failed: if the signed prefix is valid, return a partially filled-in RI (published = -1) so the session layer can still act on the identity.Methods in net.i2p.router.transport.udp that throw DataFormatExceptionModifier and TypeMethodDescriptionvoidSSU2Payload.PayloadCallback.gotDateTime(long time) Receive a date/time synchronization block.voidInboundEstablishState2.gotFragment(byte[] data, int off, int len, long messageID, int frag, boolean isLast) Got a Fragment block.voidOutboundEstablishState2.gotFragment(byte[] data, int off, int len, long messageId, int frag, boolean isLast) voidPeerState2.gotFragment(byte[] data, int off, int len, long messageId, int frag, boolean isLast) Process a received Fragment block.voidSSU2Payload.PayloadCallback.gotFragment(byte[] data, int off, int len, long messageID, int frag, boolean isLast) Receive a fragment of a fragmented message.voidSSU2Payload.PayloadCallback.gotOptions(byte[] options, boolean isHandshake) Receive a session options block.voidInboundEstablishState2.gotRI(RouterInfo ri, boolean isHandshake, boolean flood) For most errors here we throw a RIException with a reason code, which is caught inInboundEstablishState2.processPayload(byte[], int, int, boolean)to create a PeerStateDestroyed and send a termination with that reason.voidOutboundEstablishState2.gotRI(RouterInfo ri, boolean isHandshake, boolean flood) voidPeerState2.gotRI(RouterInfo ri, boolean isHandshake, boolean flood) Process a received RouterInfo block, storing and possibly flooding it.voidSSU2Payload.PayloadCallback.gotRI(RouterInfo ri, boolean isHandshake, boolean flood) Receive a complete RouterInfo block.(package private) static voidSSU2Payload.parseDateTime(SSU2Payload.PayloadCallback cb, byte[] payload, int i, int len) Parse a DATETIME block of exactly 4 bytes.(package private) static voidSSU2Payload.parseFirstFragment(SSU2Payload.PayloadCallback cb, byte[] payload, int i, int len, boolean isHandshake) Parse the first fragment of a fragmented message (data blocks only).(package private) static voidSSU2Payload.parseFollowonFragment(SSU2Payload.PayloadCallback cb, byte[] payload, int i, int len, boolean isHandshake) Parse a follow-on fragment block (data blocks only).(package private) static voidSSU2Payload.parseOptions(SSU2Payload.PayloadCallback cb, byte[] payload, int i, int len, boolean isHandshake) Parse an OPTIONS block, copying the option bytes for the callback.(package private) static voidSSU2Payload.parsePeerTest(SSU2Payload.PayloadCallback cb, byte[] payload, int i, int len, boolean isHandshake) Parse a PEERTEST block (data blocks only): message number, response code, an optional 32-byte hash for questions 2/4, and the data payload.(package private) static voidSSU2Payload.parseRouterInfo(I2PAppContext ctx, SSU2Payload.PayloadCallback cb, byte[] payload, int i, int len, boolean isHandshake) Parse a ROUTERINFO block: one- or two-byte header, then either a single (possibly compressed) RouterInfo or a fragment piece.(package private) static RouterInfoSSU2Payload.parseRouterInfoSingle(I2PAppContext ctx, ByteArrayInputStream bais) Read a complete RouterInfo from the stream, falling back to an alternate signature verification when the strict parse fails.(package private) static byte[]InboundEstablishState2.parseSessionKeys(RouterAddress ra, byte[] publicKey) Decode and verify the SSU2 IKey/S options of the negotiated RouterInfo address and verify that the peer's S key matches the X25519 public key already derived from the handshake.static intSSU2Payload.processPayload(I2PAppContext ctx, SSU2Payload.PayloadCallback cb, byte[] payload, int off, int length, boolean isHandshake, RemoteHostId from) Incoming payload.(package private) static RouterInfoSSU2Payload.recoverRouterInfo(I2PAppContext ctx, ByteArrayInputStream bais, DataFormatException dfe) Alternate verification of a RouterInfo whose strict parse failed: if the signed prefix is valid, return a partially filled-in RI (published = -1) so the session layer can still act on the identity.Constructors in net.i2p.router.transport.udp that throw DataFormatExceptionModifierConstructorDescriptionInboundMessageState(RouterContext ctx, long messageId, Hash from, byte[] data, int off, int len, int fragmentNum, boolean isLast) Creates an InboundMessageState and stores the first received fragment.Uses of DataFormatException in net.i2p.sam
Methods in net.i2p.sam that throw DataFormatExceptionModifier and TypeMethodDescriptionbooleanSAMv2StreamSession.connect(int id, String dest, Properties props) Connect the SAM STREAM session to the specified Destination.voidMasterSession.connectAsync(SAMv3Handler handler, String dest, Properties props) Throws, use a STREAM subsession instead.voidSAMv3StreamSession.connectAsync(SAMv3Handler handler, String dest, Properties props) Initiate an async STREAM CONNECT.static DestinationResolve the destination from a key or a hostname.private static StringSAMv3Handler.initDestination(String dest, Properties props) Resolve TRANSIENT or validate a user-supplied private key.private voidSAMv3Handler.instantiateSession(String style, String nick, Properties allProps, Properties props) Create and start the session object for the given style.private SAMStreamSessionSAMv1Handler.newSAMStreamSession(String destKeystream, String direction, Properties props) Opens a stream session for the destination named on the command line.private static SAMv3StreamSessionSAMv3Handler.newSAMStreamSession(String login) Create a stream session for a login.(package private) SAMStreamSessionSAMv2Handler.newSAMv2StreamSession(String destKeystream, String direction, Properties props) New SAMv2 stream session.booleanSend bytes through a SAM DATAGRAM session.booleanSAMDatagramSession.sendBytes(String dest, byte[] data, int proto, int fromPort, int toPort, boolean sendLeaseSet, int sendTags, int tagThreshold, int expiration) Send bytes through a SAM DATAGRAM session.booleanSend bytes through a SAM message-based session.booleanSAMMessageSess.sendBytes(String dest, byte[] data, int proto, int fromPort, int toPort, boolean sendLeaseSet, int sendTags, int tagThreshold, int expiration) Send bytes through a SAM message-based session, with per-message extended options.abstract booleanSend bytes through a SAM message-based session.booleanSend bytes through a SAM RAW session.booleanSAMRawSession.sendBytes(String dest, byte[] data, int proto, int fromPort, int toPort, boolean sendLeaseSet, int sendTags, int tagThreshold, int expiration) Send bytes through a SAM RAW session.protected booleanSAMMessageSession.sendBytesThroughMessageSession(String dest, byte[] data, int proto, int fromPort, int toPort) Actually send bytes through the SAM message-based session I2PSession (er...).protected booleanSAMMessageSession.sendBytesThroughMessageSession(String dest, byte[] data, int proto, int fromPort, int toPort, boolean sendLeaseSet, int sendTags, int tagThreshold, int expiration) Actually send bytes through the SAM message-based session I2PSession, using per-message extended options.Constructors in net.i2p.sam that throw DataFormatExceptionModifierConstructorDescriptionMasterSession(String nick, SAMv3DatagramServer dgServer, SAMv3Handler handler, Properties props) Build a Session according to information registered with the given nickname.protectedSAMDatagramSession(String dest, Properties props, SAMDatagramReceiver recv) Create a new SAM DATAGRAM session.protectedSAMRawSession(String dest, Properties props, SAMRawReceiver recv) Create a new SAM RAW session.SAMv2StreamSession(InputStream destStream, String dir, Properties props, SAMStreamReceiver recv) Create a new SAM STREAM session.SAMv2StreamSession(String dest, String dir, Properties props, SAMStreamReceiver recv) Create a new SAM STREAM session.SAMv3DatagramSession(String nick, Properties props, SAMv3Handler handler, I2PSession isess, int listenProtocol, int listenPort, SAMv3DatagramServer dgServer) Build a Datagram Session on an existing i2p session registered with the given nicknameSAMv3DatagramSession(String nick, SAMv3DatagramServer dgServer) Build a DatagramSession according to informations registered with the given nicknameSAMv3RawSession(String nick, Properties props, SAMv3Handler handler, I2PSession isess, int listenProtocol, int listenPort, SAMv3DatagramServer dgServer) Build a Raw Session on an existing i2p session registered with the given nicknameSAMv3RawSession(String nick, SAMv3DatagramServer dgServer) Build a Raw Datagram Session according to information registered with the given nicknameSAMv3StreamSession(String login) Create a new SAM STREAM session, according to information registered with the given nicknameUses of DataFormatException in org.klomp.snark.dht
Constructors in org.klomp.snark.dht that throw DataFormatException