forked from I2P_Developers/i2p.i2p
Router: Add support for building tunnels through ECIES routers (proposals 152,156)
Preliminary, proposal not finalized, subject to change Not yet compatibility tested with other implementations Add peers to match requested length for explicitPeers remove commented out code log tweaks
This commit is contained in:
@ -302,19 +302,22 @@ public class DataHelper {
|
||||
*
|
||||
* Properties from the defaults table of props (if any) are not written out by this method.
|
||||
*
|
||||
* @deprecated unused
|
||||
*
|
||||
* @param target returned array as specified in data structure spec
|
||||
* @param props source may be null
|
||||
* @return new offset
|
||||
* @throws DataFormatException if any string is over 255 bytes long, or if the total length
|
||||
* (not including the two length bytes) is greater than 65535 bytes.
|
||||
* @since un-deprecated in 0.9.48
|
||||
*/
|
||||
@Deprecated
|
||||
public static int toProperties(byte target[], int offset, Properties props) throws DataFormatException, IOException {
|
||||
if (props != null) {
|
||||
OrderedProperties p = new OrderedProperties();
|
||||
p.putAll(props);
|
||||
if (props != null && !props.isEmpty()) {
|
||||
Properties p;
|
||||
if (props instanceof OrderedProperties) {
|
||||
p = props;
|
||||
} else {
|
||||
p = new OrderedProperties();
|
||||
p.putAll(props);
|
||||
}
|
||||
ByteArrayOutputStream baos = new ByteArrayOutputStream(p.size() * 64);
|
||||
for (Map.Entry<Object, Object> entry : p.entrySet()) {
|
||||
String key = (String) entry.getKey();
|
||||
|
Reference in New Issue
Block a user