Changeset c59ef24
- Timestamp:
- Nov 26, 2013 8:16:45 PM (7 years ago)
- Branches:
- master
- Children:
- 8770d7e
- Parents:
- 85aa2fb
- Location:
- apps/i2psnark/java/src/org/klomp/snark/bencode
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
apps/i2psnark/java/src/org/klomp/snark/bencode/BEValue.java
r85aa2fb rc59ef24 143 143 * throw a InvalidBEncodingException. 144 144 */ 145 @SuppressWarnings("unchecked") 145 146 public List<BEValue> getList() throws InvalidBEncodingException 146 147 { … … 160 161 * a Map, otherwise it will throw a InvalidBEncodingException. 161 162 */ 163 @SuppressWarnings("unchecked") 162 164 public Map<String, BEValue> getMap() throws InvalidBEncodingException 163 165 { -
apps/i2psnark/java/src/org/klomp/snark/bencode/BEncoder.java
r85aa2fb rc59ef24 60 60 bencode((Number)o, out); 61 61 else if (o instanceof List) 62 bencode((List )o, out);62 bencode((List<?>)o, out); 63 63 else if (o instanceof Map) 64 bencode((Map< String, Object>)o, out);64 bencode((Map<?, ?>)o, out); 65 65 else if (o instanceof BEValue) 66 66 bencode(((BEValue)o).getValue(), out); … … 111 111 } 112 112 113 public static byte[] bencode(List l)113 public static byte[] bencode(List<?> l) 114 114 { 115 115 try … … 125 125 } 126 126 127 public static void bencode(List l, OutputStream out) throws IOException127 public static void bencode(List<?> l, OutputStream out) throws IOException 128 128 { 129 129 out.write('l'); 130 Iterator it = l.iterator();130 Iterator<?> it = l.iterator(); 131 131 while (it.hasNext()) 132 132 bencode(it.next(), out);
Note: See TracChangeset
for help on using the changeset viewer.