Changeset f77fc52 for core


Ignore:
Timestamp:
Jan 26, 2017 8:37:44 PM (4 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
8bb114e
Parents:
d9c6360
Message:

javadoc fixes part 1 (ticket #1894)

Location:
core/java/src/net/i2p
Files:
19 edited

Legend:

Unmodified
Added
Removed
  • core/java/src/net/i2p/client/I2PClient.java

    rd9c6360 rf77fc52  
    4848
    4949    /**
    50      * For router->client payloads.
     50     * For router-&gt;client payloads.
    5151     *
    5252     * If false, the router will send the MessageStatus,
  • core/java/src/net/i2p/client/I2PSession.java

    rd9c6360 rf77fc52  
    7474     *
    7575     * Like sendMessage above, except the key used and the tags sent are exposed to the
    76      * application.  <p />
     76     * application.  <p>
    7777     *
    7878     * If some application layer message delivery confirmation is used,
     
    332332     *
    333333     *<pre>
    334      *  if (name.length() == 60 && name.toLowerCase(Locale.US).endsWith(".b32.i2p")) {
     334     *  if (name.length() == 60 &amp;&amp; name.toLowerCase(Locale.US).endsWith(".b32.i2p")) {
    335335     *      if (session != null)
    336336     *          return session.lookup(Hash.create(Base32.decode(name.toLowerCase(Locale.US).substring(0, 52))));
  • core/java/src/net/i2p/client/impl/I2PClientMessageHandlerMap.java

    rd9c6360 rf77fc52  
    2828 */
    2929class I2PClientMessageHandlerMap {
    30     /** map of message type id --> I2CPMessageHandler */
     30    /** map of message type id --&gt; I2CPMessageHandler */
    3131    protected I2CPMessageHandler _handlers[];
    3232
  • core/java/src/net/i2p/client/impl/I2PSessionImpl.java

    rd9c6360 rf77fc52  
    125125    /** class that generates new messages */
    126126    protected final I2CPMessageProducer _producer;
    127     /** map of Long --> MessagePayloadMessage */
     127    /** map of Long --&gt; MessagePayloadMessage */
    128128    protected Map<Long, MessagePayloadMessage> _availableMessages;
    129129
  • core/java/src/net/i2p/client/impl/I2PSessionMuxedImpl.java

    rd9c6360 rf77fc52  
    3535 *
    3636 * Compatibility:
    37  *    old streaming -> new streaming: sends proto anything, rcvs proto anything
    38  *    new streaming -> old streaming: sends PROTO_STREAMING, ignores rcvd proto
    39  *    old datagram -> new datagram: sends proto anything, rcvs proto anything
    40  *    new datagram -> old datagram: sends PROTO_DATAGRAM, ignores rcvd proto
     37 *    old streaming -&gt; new streaming: sends proto anything, rcvs proto anything
     38 *    new streaming -&gt; old streaming: sends PROTO_STREAMING, ignores rcvd proto
     39 *    old datagram -&gt; new datagram: sends proto anything, rcvs proto anything
     40 *    new datagram -&gt; old datagram: sends PROTO_DATAGRAM, ignores rcvd proto
    4141 *    In all the above cases, streaming and datagram receive traffic for the other
    4242 *    protocol, same as before.
    4343 *
    44  *    old datagram -> new muxed: doesn't work because the old sends proto 0 but the udp side
     44 *    old datagram -&gt; new muxed: doesn't work because the old sends proto 0 but the udp side
    4545 *                               of the mux registers with PROTO_DATAGRAM, so the datagrams
    4646 *                               go to the streaming side, same as before.
    47  *    old streaming -> new muxed: works
     47 *    old streaming -&gt; new muxed: works
    4848 *
    4949 * Typical Usage:
     
    422422     *  No, we couldn't put any protocol byte in front of everything and
    423423     *  keep backward compatibility. But there are several bytes that
    424      *  are unused AND unchecked in the gzip header in releases <= 0.7.
     424     *  are unused AND unchecked in the gzip header in releases &lt;= 0.7.
    425425     *  So let's use 5 of them for a protocol and two 2-byte ports.
    426426     *
  • core/java/src/net/i2p/crypto/SHA1.java

    rd9c6360 rf77fc52  
    2929 * <p>The FIPS PUB 180-2 standard specifies four secure hash algorithms (SHA-1,
    3030 * SHA-256, SHA-384 and SHA-512) for computing a condensed representation of
    31  * electronic data (message).  When a message of any length < 2^^64 bits (for
    32  * SHA-1 and SHA-256) or < 2^^128 bits (for SHA-384 and SHA-512) is input to
     31 * electronic data (message).  When a message of any length &lt; 2^^64 bits (for
     32 * SHA-1 and SHA-256) or &lt; 2^^128 bits (for SHA-384 and SHA-512) is input to
    3333 * an algorithm, the result is an output called a message digest.  The message
    3434 * digests range in length from 160 to 512 bits, depending on the algorithm.
  • core/java/src/net/i2p/crypto/eddsa/math/ed25519/Ed25519LittleEndianEncoding.java

    rd9c6360 rf77fc52  
    1919     * <p><ul>
    2020     * <li>p = 2^255 - 19
    21      * <li>h = h0 + 2^25 * h1 + 2^(26+25) * h2 + ... + 2^230 * h9 where 0 <= |hi| < 2^27 for all i=0,...,9.
    22      * <li>h congruent r modulo p, i.e. h = r + q * p for some suitable 0 <= r < p and an integer q.
     21     * <li>h = h0 + 2^25 * h1 + 2^(26+25) * h2 + ... + 2^230 * h9 where 0 &lt;= |hi| &lt; 2^27 for all i=0,...,9.
     22     * <li>h congruent r modulo p, i.e. h = r + q * p for some suitable 0 &lt;= r &lt; p and an integer q.
    2323     * </ul><p>
    2424     * Then q = [2^-255 * (h + 19 * 2^-25 * h9 + 1/2)] where [x] = floor(x).
     
    2727     * <p>
    2828     * We begin with some very raw estimation for the bounds of some expressions:
    29      * <pre>|h| < 2^230 * 2^30 = 2^260 ==> |r + q * p| < 2^260 ==> |q| < 2^10.
    30      * ==> -1/4 <= a := 19^2 * 2^-255 * q < 1/4.
    31      * |h - 2^230 * h9| = |h0 + ... + 2^204 * h8| < 2^204 * 2^30 = 2^234.
    32      * ==> -1/4 <= b := 19 * 2^-255 * (h - 2^230 * h9) < 1/4</pre>
    33      * Therefore 0 < 1/2 - a - b < 1.
     29     * <pre>|h| &lt; 2^230 * 2^30 = 2^260 ==&gt; |r + q * p| &lt; 2^260 ==&gt; |q| &lt; 2^10.
     30     * ==&gt; -1/4 &lt;= a := 19^2 * 2^-255 * q &lt; 1/4.
     31     * |h - 2^230 * h9| = |h0 + ... + 2^204 * h8| &lt; 2^204 * 2^30 = 2^234.
     32     * ==&gt; -1/4 &lt;= b := 19 * 2^-255 * (h - 2^230 * h9) &lt; 1/4</pre>
     33     * Therefore 0 &lt; 1/2 - a - b &lt; 1.
    3434     * <p>
    3535     * Set x := r + 19 * 2^-255 * r + 1/2 - a - b then
    36      * 0 <= x < 255 - 20 + 19 + 1 = 2^255 ==> 0 <= 2^-255 * x < 1. Since q is an integer we have
     36     * 0 &lt;= x &lt; 255 - 20 + 19 + 1 = 2^255 ==&gt; 0 &lt;= 2^-255 * x &lt; 1. Since q is an integer we have
    3737     *
    3838     * <pre>[q + 2^-255 * x] = q        (1)</pre>
  • core/java/src/net/i2p/data/SigningPublicKey.java

    rd9c6360 rf77fc52  
    151151     *  if any
    152152     *
    153      *  @return leading padding length > 0 or null if no padding or type is unknown
     153     *  @return leading padding length &gt; 0 or null if no padding or type is unknown
    154154     *  @throws IllegalArgumentException if this is already typed to a different type
    155155     *  @since 0.9.12
  • core/java/src/net/i2p/data/i2cp/RequestVariableLeaseSetMessage.java

    rd9c6360 rf77fc52  
    4545     *
    4646     *  @param clientVersion may be null
    47      *  @return version != null and version >= 0.9.7
     47     *  @return version != null and version &gt;= 0.9.7
    4848     */
    4949    public static boolean isSupported(String clientVersion) {
  • core/java/src/net/i2p/kademlia/KBucketSet.java

    rd9c6360 rf77fc52  
    7373     * @param us the local identity (typically a SHA1Hash or Hash)
    7474     *           The class must have a zero-argument constructor.
    75      * @param max the Kademlia value "k", the max per bucket, k >= 4
     75     * @param max the Kademlia value "k", the max per bucket, k &gt;= 4
    7676     * @param b the Kademlia value "b", split buckets an extra 2**(b-1) times,
    77      *           b > 0, use 1 for bittorrent, Kademlia paper recommends 5
     77     *           b &gt; 0, use 1 for bittorrent, Kademlia paper recommends 5
    7878     */
    7979    public KBucketSet(I2PAppContext context, T us, int max, int b) {
     
    169169    /**
    170170     *  No lock required.
    171      *  FIXME will split the closest buckets too far if B > 1 and K < 2**B
     171     *  FIXME will split the closest buckets too far if B &gt; 1 and K &lt; 2**B
    172172     *  Won't ever really happen and if it does it still works.
    173173     */
     
    626626    /**
    627627     *  Make a new SimpleDataStrucure from the data
    628      *  @param data size <= SDS length, else throws IAE
     628     *  @param data size &lt;= SDS length, else throws IAE
    629629     *              Can be 1 bigger if top byte is zero
    630630     */
  • core/java/src/net/i2p/stat/RateAverages.java

    rd9c6360 rf77fc52  
    3939     * @since 0.9.4
    4040     * @return one of several things:
    41      * if there are any events (current or last) => weighted average
     41     * if there are any events (current or last) =&gt; weighted average
    4242     * otherwise if the useLifetime parameter to Rate.computeAverages was:
    43      * true => the lifetime average value
    44      * false => zero
     43     * true =&gt; the lifetime average value
     44     * false =&gt; zero
    4545     */
    4646    public double getAverage() {
  • core/java/src/net/i2p/util/EventDispatcher.java

    rd9c6360 rf77fc52  
    1414/**
    1515 * Event dispatching interface.  It allows objects to receive and
    16  * notify data events (basically String->Object associations) and
     16 * notify data events (basically String-&gt;Object associations) and
    1717 * create notification chains.  To ease the usage of this interface,
    1818 * you could define an EventDispatcherImpl attribute called
  • core/java/src/net/i2p/util/InternalServerSocket.java

    rd9c6360 rf77fc52  
    3232
    3333    /**
    34      *  @param port > 0
     34     *  @param port &gt; 0
    3535     */
    3636    public InternalServerSocket(int port) throws IOException {
     
    8888     *  This is how the client connects.
    8989     *
    90      *  @param port > 0
     90     *  @param port &gt; 0
    9191     */
    9292    static void internalConnect(int port, InternalSocket clientSock) throws IOException {
  • core/java/src/net/i2p/util/InternalSocket.java

    rd9c6360 rf77fc52  
    2727    /**
    2828     *  client side
    29      *  @param port > 0
     29     *  @param port &gt; 0
    3030     */
    3131    public InternalSocket(int port) throws IOException {
     
    3737    /**
    3838     *  Convenience method to return either a Socket or an InternalSocket
    39      *  @param port > 0
     39     *  @param port &gt; 0
    4040     */
    4141    public static Socket getSocket(String host, int port) throws IOException {
  • core/java/src/net/i2p/util/ObjectCounter.java

    rd9c6360 rf77fc52  
    4545
    4646    /**
    47      *  @return set of objects with counts > 0
     47     *  @return set of objects with counts &gt; 0
    4848     */
    4949    public Set<K> objects() {
  • core/java/src/net/i2p/util/PortMapper.java

    rd9c6360 rf77fc52  
    5151    /**
    5252     *  Add the service
    53      *  @param port > 0
     53     *  @param port &gt; 0
    5454     *  @return success, false if already registered
    5555     */
     
    6060    /**
    6161     *  Add the service
    62      *  @param port > 0
     62     *  @param port &gt; 0
    6363     *  @return success, false if already registered
    6464     *  @since 0.9.21
  • core/java/src/net/i2p/util/SimpleTimer2.java

    rd9c6360 rf77fc52  
    209209     *
    210210     * valid transitions:
    211      * {IDLE,CANCELLED,RUNNING} -> SCHEDULED [ -> SCHEDULED ]* -> RUNNING -> {IDLE,CANCELLED,SCHEDULED}
    212      * {IDLE,CANCELLED,RUNNING} -> SCHEDULED [ -> SCHEDULED ]* -> CANCELLED
     211     * {IDLE,CANCELLED,RUNNING} -&gt; SCHEDULED [ -&gt; SCHEDULED ]* -&gt; RUNNING -&gt; {IDLE,CANCELLED,SCHEDULED}
     212     * {IDLE,CANCELLED,RUNNING} -&gt; SCHEDULED [ -&gt; SCHEDULED ]* -&gt; CANCELLED
    213213     *
    214214     * anything else is invalid.
     
    232232     *
    233233     * Other porting:
    234      *   SimpleTimer.getInstance().addEvent(new foo(), timeout) => new foo(SimpleTimer2.getInstance(), timeout)
    235      *   SimpleTimer.getInstance().addEvent(this, timeout) => schedule(timeout)
    236      *   SimpleTimer.getInstance().addEvent(foo, timeout) => foo.reschedule(timeout)
    237      *   SimpleTimer.getInstance().removeEvent(foo) => foo.cancel()
     234     *   SimpleTimer.getInstance().addEvent(new foo(), timeout) =&gt; new foo(SimpleTimer2.getInstance(), timeout)
     235     *   SimpleTimer.getInstance().addEvent(this, timeout) =&gt; schedule(timeout)
     236     *   SimpleTimer.getInstance().addEvent(foo, timeout) =&gt; foo.reschedule(timeout)
     237     *   SimpleTimer.getInstance().removeEvent(foo) =&gt; foo.cancel()
    238238     *
    239239     * There's no global locking, but for scheduling, we synchronize on this
  • core/java/src/net/i2p/util/SystemVersion.java

    rd9c6360 rf77fc52  
    150150
    151151    /**
    152      *  Better than (new VersionComparator()).compare(System.getProperty("java.version"), "1.6") >= 0
     152     *  Better than (new VersionComparator()).compare(System.getProperty("java.version"), "1.6") &gt;= 0
    153153     *  as it handles Android also, where java.version = "0".
    154154     *
     
    160160
    161161    /**
    162      *  Better than (new VersionComparator()).compare(System.getProperty("java.version"), "1.7") >= 0
     162     *  Better than (new VersionComparator()).compare(System.getProperty("java.version"), "1.7") &gt;= 0
    163163     *  as it handles Android also, where java.version = "0".
    164164     *
     
    194194     * http://mark.koli.ch/2009/10/reliably-checking-os-bitness-32-or-64-bit-on-windows-with-a-tiny-c-app.html
    195195     * sun.arch.data.model not on all JVMs
    196      * sun.arch.data.model == 64 => 64 bit processor
    197      * sun.arch.data.model == 32 => A 32 bit JVM but could be either 32 or 64 bit processor or libs
     196     * sun.arch.data.model == 64 =&gt; 64 bit processor
     197     * sun.arch.data.model == 32 =&gt; A 32 bit JVM but could be either 32 or 64 bit processor or libs
    198198     * os.arch contains "64" could be 32 or 64 bit libs
    199199     */
  • core/java/src/net/i2p/util/Translate.java

    rd9c6360 rf77fc52  
    6868     *  @param s string to be translated containing {0}
    6969     *    The {0} will be replaced by the parameter.
    70      *    Single quotes must be doubled, i.e. ' -> '' in the string.
     70     *    Single quotes must be doubled, i.e. ' -&gt; '' in the string.
    7171     *  @param o parameter, not translated.
    7272     *    To translate parameter also, use _t("foo {0} bar", _t("baz"))
Note: See TracChangeset for help on using the changeset viewer.