@Test public void testDecode() { try { FileInputStream in = null; in = new FileInputStream(f); Map m = new BDecoder(in).bdecode().getMap(); BEValue val = (BEValue) m.get("minId"); if (val == null) { throw new InvalidBEncodingException("minId"); } assertEquals(minId, val.getNumber().intValue()); val = (BEValue) m.get("maxId"); if (val == null) { throw new InvalidBEncodingException("maxId"); } assertEquals(maxId, val.getNumber().intValue()); val = (BEValue) m.get("name"); if (val == null) { throw new InvalidBEncodingException("name"); } assertEquals(name, val.getString()); } catch (InvalidBEncodingException ex) { Logger.getLogger(BDecoderTest.class.getName()).log(Level.SEVERE, null, ex); } catch (FileNotFoundException ex) { Logger.getLogger(BDecoderTest.class.getName()).log(Level.SEVERE, null, ex); } catch (IOException ex) { Logger.getLogger(BDecoderTest.class.getName()).log(Level.SEVERE, null, ex); } }
public static BEValue bdecode(InputStream in) throws IOException { return new BDecoder(in).bdecode(); }
BDecoder { public static BEValue bdecode(InputStream in) throws IOException { return new BDecoder(in).bdecode(); } }
BDecoder { public static BEValue bdecode(InputStream in) throws IOException { return new BDecoder(in).bdecode(); } BDecoder(InputStream in); }
BDecoder { public static BEValue bdecode(InputStream in) throws IOException { return new BDecoder(in).bdecode(); } BDecoder(InputStream in); byte[] get_special_map_digest(); void set_special_map_name(String name); static BEValue bdecode(InputStream in); int getNextIndicator(); BEValue bdecode(); BEValue bdecodeBytes(); BEValue bdecodeBooleans(); BEValue bdecodeNumber(); BEValue bdecodeList(); BEValue bdecodeAddress(); BEValue bdecodeMap(); }
BDecoder { public static BEValue bdecode(InputStream in) throws IOException { return new BDecoder(in).bdecode(); } BDecoder(InputStream in); byte[] get_special_map_digest(); void set_special_map_name(String name); static BEValue bdecode(InputStream in); int getNextIndicator(); BEValue bdecode(); BEValue bdecodeBytes(); BEValue bdecodeBooleans(); BEValue bdecodeNumber(); BEValue bdecodeList(); BEValue bdecodeAddress(); BEValue bdecodeMap();  }