These classes define the several useful utilities used throughout the router and applications.
Interface Summary Interface Description BandwidthEstimatorA Westwood bandwidth estimator Clock.ClockUpdateListener EepGet.StatusListenerCallback interface EventDispatcherEvent dispatching interface. I2PProperties.I2PPropertyCallback I2PThread.OOMEventListener SimpleTimer.TimedEventSimple interface for events to be queued up and notified on expiration TryCache.ObjectFactory<T>Something that creates objects of the type cached by this cache
Class Summary Class Description AddressesMethods to get the local addresses, and other IP utilities ByteArrayStreamOutputStream to InputStream adapter. ByteCacheCache the objects frequently used to reduce memory churn. ClockAlternate location for determining the time which takes into account an offset. CommandLineSimple command line access to various utilities. ConcurrentHashSet<E>Implement on top of a ConcurrentHashMap with a dummy value. ConvertToHashConvert any kind of destination String to a hash Supported: Base64 dest Base64 dest.i2p Base64 Hash Base64 Hash.i2p Base32 Hash Base32 desthash.b32.i2p example.i2p DNSOverHTTPSSimple implemetation of DNS over HTTPS. EepGetEepGet [-p 127.0.0.1:4444] [-n #retries] [-o outputFile] [-m markSize lineLen] url EepHeadThis is a quick hack to get a working EepHead, primarily for the following usage: EventDispatcherImplAn implementation of the EventDispatcher interface. ExecutorDeprecated - used only by SimpleTimer FileLogWriterFile-based log writer thread that pulls log records from the LogManager, writes them to the current logfile, and rotates the logs as necessary. FileSuffixFilterA FileFilter that accepts regular files with a suffix and optionally a prefix, case-insensitive. FileUtilGeneral helper methods for messing with files These are static methods that do NOT convert arguments to absolute paths for a particular context and directory. FortunaRandomSourceWrapper around GNU-Crypto's Fortuna PRNG. HexDumpHexdump class (well, it's actually a namespace with some functions, but let's stick with java terminology :-). I2PAppThreadLike
I2PThreadbut with per-thread OOM listeners, rather than a static router-wide listener list, so that an OOM in an app won't call the router listener to shutdown the whole router.
I2PPropertiesThis class contains a number of properties ((key,value)-pairs). I2PSSLSocketFactoryLoads trusted ASCII certs from ~/.i2p/certificates/ and $I2P/certificates/. I2PThreadPreferred over
Threadfor all router uses.
InternalServerSocketA simple in-JVM ServerSocket using Piped Streams. InternalSocketA simple in-JVM Socket using Piped Streams. KeyRingsimple LHMCache<K,V>A LinkedHashMap with a maximum size, for use as an LRU cache. LogWrapper class for whatever logging system I2P uses. LogConsoleBufferOffer a glimpse into the last few console messages generated. LogLimitDefines the log limit for a particular set of logs LogManagerManages the logging system, loading (and reloading) the configuration file, coordinating the log limits, and storing the set of log records pending. LogRecordKeep track of a log entry, unformatted. LogRecordFormatterRender a log record according to the log manager's settings LogWriterLog writer thread that pulls log records from the LogManager and writes them to the log. LookaheadInputStreamSimple lookahead buffer to keep the last K bytes in reserve, configured to easily be reused. NativeBigIntegerBigInteger that takes advantage of the jbigi library for the modPow operation, which accounts for a massive segment of the processing cost of asymmetric crypto. ObjectCounter<K>Count things. OrderedPropertiesProperties map that has its keySet ordered consistently (via the key's lexicographical ordering). PartialEepGetFetch exactly the first 'size' bytes into a stream Anything less or more will throw an IOException No retries, no min and max size options, no timeout option If the server does not return a Content-Length header of the correct size, the fetch will fail. PasswordManagerManage both plaintext and salted/hashed password storage in router.config. PortMapperMap services to internal or external application ports for this context. RandomSourceSingleton for whatever PRNG i2p uses. ResettableGZIPInputStreamGZIP implementation per RFC 1952, reusing java's standard CRC32 and Inflater and InflaterInputStream implementations. ResettableGZIPOutputStreamGZIP implementation per RFC 1952, reusing java's standard CRC32 and Deflater implementations. ReusableGZIPInputStreamProvide a cache of reusable GZIP unzipper streams. ReusableGZIPOutputStreamProvide a cache of reusable GZIP streams, each handling up to 40 KB output without expansion. RFC822DateMoved from NewsFetcher SecureDirectorySame as File but sets the file mode after mkdir() so it can be read and written by the owner only (i.e. SecureFileSame as SecureDirectory but sets the file mode after createNewFile() and createTempFile() also. SecureFileOutputStreamSame as FileOutputStream but sets the file mode so it can only be read and written by the owner only (i.e. ShellCommandPasses a command to the OS shell for execution and manages the input and output. SimpleByteCacheLike ByteCache but works directly with byte arrays, not ByteArrays. SimpleScheduler Deprecated.in 0.9.20, use SimpleTimer2 instead SimpleStoreDeprecated - used only by SimpleTimer SimpleTimerSimple event scheduler - toss an event on the queue and it gets fired at the appropriate time. SimpleTimer2Simple event scheduler - toss an event on the queue and it gets fired at the appropriate time. SimpleTimer2.TimedEventSimilar to SimpleTimer.TimedEvent but users must extend instead of implement, and all schedule and cancel methods are through this class rather than SimpleTimer2. SipHashWrapper around SipHashInline with constant per-JVM keys SocketTimeoutImplements one or two timers; one for inactivity, that is reset by resetTimer(), and optionally, a total time since instantiation, that is configured by setTotalTimeoutPeriod(). SSLEepGetHTTPS only, no retries, no min and max size options, no timeout option As of 0.9.45, supports redirect to https (redirect to http will still fail). SSLEepGet.SSLStateAn opaque class for the caller to pass to repeated instantiations of SSLEepGet. SystemVersionMethods to find out what system we are running on TimeoutPipedInputStreamAdds setReadTimeout(). TimeoutPipedOutputStreamHelper for TimeoutPipedInputStream. TranslateTranslate strings efficiently. TranslateReaderTranslate. TryCache<T>An object cache which is safe to use by multiple threads without blocking. UIMessagesA queue of messages, where each has an ID number. UIMessages.Message VersionComparatorCompares versions. ZipFileComment Deprecated.scheduled for removal late 2017, not for external use
Enum Summary Enum Description DNSOverHTTPS.Type EepGet.AUTH_MODE SSLEepGet.ProxyTypeNot all may be supported.