@@ -0,0 +1,522 @@
+package Tracker;%0A%0Aimport java.nio.ByteBuffer;%0A%0A/**%0A * %0A * @author Pawel%0A *%0A */%0A%0A/**%0A InfoHash is needed for identifying a torrent, its length is 20 bytes.%0A */%0A%0Apublic class InfoHash %0A%7B%0A%09private ByteBuffer infoHashBuffer = ByteBuffer.allocate(20);%0A%09%0A%09// Constructor%0A%09%0A%09public InfoHash (byte%5B%5D infoHashBytes) %7B%0A%0A%09%09if ((infoHashBytes == null) %7C%7C (infoHashBytes.length != 20)) %0A%09%09%7B%0A%09%09%09System.out.println(%22Provided bytes are not correct!%22);%0A%09%09%7D%0A%0A%09%09this.infoHashBuffer.put (infoHashBytes);%0A%09%09this.infoHashBuffer.rewind();%0A%0A%09%7D%0A%7D%0A

Create InfoHash.java