NullPointerException on unchanged bittorrent library of BitLet

100 views Asked by At

I just put a torrent on it, did not change the code.

Console:

Exception in thread "main" java.lang.NullPointerException
    at org.bitlet.wetorrent.Metafile.<init>(Metafile.java:87)
    at org.bitlet.wetorrent.Sample.main(Sample.java:35)

It's on this:

35: Metafile metafile = new Metafile(new BufferedInputStream(new FileInputStream(filename)));

In Metafile code:

87: byte[] announceByteString = ((ByteBuffer) rootDictionary.get(ByteBuffer.wrap("announce".getBytes()))).array();

I just got the source code to begin studing it, but it doesn't run.


Files:

I changed just one line (from Sample.java):

From:

String filename = args[0];

To:

String filename = "C:\\Torrents\\Tao Of Jeet Kune Do By Bruce Lee (Pdf,Epub) Gooner.torrent";

It takes the torrent file name from the command line argument, I just put it on the code.

0

There are 0 answers