Changeset b573dab


Ignore:
Timestamp:
May 20, 2014 1:22:07 PM (7 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
73943b1a
Parents:
a766eca
Message:

javadocs

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • apps/i2psnark/java/src/org/klomp/snark/ExtensionHandler.java

    ra766eca rb573dab  
    3232    /** not using the option bit since the compact format is different */
    3333    public static final String TYPE_DHT = "i2p_dht";
    34     /** Pieces * SHA1 Hash length, + 25% extra for file names, benconding overhead, etc */
     34    /** Pieces * SHA1 Hash length, + 25% extra for file names, bencoding overhead, etc */
    3535    private static final int MAX_METADATA_SIZE = Storage.MAX_PIECES * 20 * 5 / 4;
    3636    private static final int PARALLEL_REQUESTS = 3;
  • core/java/src/net/i2p/data/DataHelper.java

    ra766eca rb573dab  
    526526    }
    527527
    528     private static final byte[] EMPTY_BUFFER = "".getBytes();
     528    private static final byte[] EMPTY_BUFFER = new byte[0];
    529529   
    530530    /**
     
    552552    }
    553553
     554    /**
     555     *  Positive decimal without leading zeros.
     556     *  @param data may be null (returns "0")
     557     *  @param len unused
     558     *  @return (new BigInteger(1, buf)).toString()
     559     *  @deprecated unused
     560     */
    554561    public static String toDecimalString(byte buf[], int len) {
    555         if (buf == null) buf = EMPTY_BUFFER;
     562        if (buf == null)
     563            return "0";
    556564        BigInteger val = new BigInteger(1, buf);
    557         return val.toString(10);
     565        return val.toString();
    558566    }
    559567
     
    569577    }
    570578
     579    /**
     580     *  @param val non-null, may have leading minus sign
     581     *  @return minimum-length representation (with possible leading 0 byte)
     582     *  @deprecated unused
     583     */
    571584    public final static byte[] fromHexString(String val) {
    572585        BigInteger bv = new BigInteger(val, 16);
Note: See TracChangeset for help on using the changeset viewer.