@@ -0,0 +1,825 @@
+package de.tubs.ibr.dtn.api;%0A%0Aimport android.os.ParcelFileDescriptor;%0A%0Apublic abstract class SimpleDataHandler implements DataHandler %7B%0A%09%0A%09private Bundle mBundle = null;%0A%09%0A%09protected abstract void onMessage(BundleID id, byte%5B%5D data);%0A%0A%09@Override%0A%09public void startBundle(Bundle bundle) %7B%0A%09%09mBundle = bundle;%0A%09%7D%0A%0A%09@Override%0A%09public void endBundle() %7B%0A%09%09mBundle = null;%0A%09%7D%0A%0A%09@Override%0A%09public TransferMode startBlock(Block block) %7B%0A%09%09if (block.type == 1 && block.length %3C= 4096) %7B%0A%09%09%09return TransferMode.SIMPLE;%0A%09%09%7D else %7B%0A%09%09%09return TransferMode.NULL;%0A%09%09%7D%0A%09%7D%0A%0A%09@Override%0A%09public void endBlock() %7B%0A%09%7D%0A%0A%09@Override%0A%09public void payload(byte%5B%5D data) %7B%0A%09%09onMessage(new BundleID(mBundle), data);%0A%09%7D%0A%0A%09@Override%0A%09public ParcelFileDescriptor fd() %7B%0A%09%09return null;%0A%09%7D%0A%0A%09@Override%0A%09public void progress(long current, long length) %7B%0A%09%7D%0A%7D%0A

Add simple data handler