// Path: library/src/main/java/de/tubs/ibr/dtn/api/Bundle.java
// public enum ProcFlags {
// 	FRAGMENT(1 << 0x00),
// 	APPDATA_IS_ADMRECORD(1 << 0x01),
// 	DONT_FRAGMENT(1 << 0x02),
// 	CUSTODY_REQUESTED(1 << 0x03),
// 	DESTINATION_IS_SINGLETON(1 << 0x04),
// 	ACKOFAPP_REQUESTED(1 << 0x05),
// 	RESERVED_6(1 << 0x06),
// 	PRIORITY_BIT1(1 << 0x07),
// 	PRIORITY_BIT2(1 << 0x08),
// 	CLASSOFSERVICE_9(1 << 0x09),
// 	CLASSOFSERVICE_10(1 << 0x0A),
// 	CLASSOFSERVICE_11(1 << 0x0B),
// 	CLASSOFSERVICE_12(1 << 0x0C),
// 	CLASSOFSERVICE_13(1 << 0x0D),
// 	REQUEST_REPORT_OF_BUNDLE_RECEPTION(1 << 0x0E),
// 	REQUEST_REPORT_OF_CUSTODY_ACCEPTANCE(1 << 0x0F),
// 	REQUEST_REPORT_OF_BUNDLE_FORWARDING(1 << 0x10),
// 	REQUEST_REPORT_OF_BUNDLE_DELIVERY(1 << 0x11),
// 	REQUEST_REPORT_OF_BUNDLE_DELETION(1 << 0x12),
// 	STATUS_REPORT_REQUEST_19(1 << 0x13),
// 	STATUS_REPORT_REQUEST_20(1 << 0x14),
// 
// 	// DTNSEC FLAGS (these are customized flags and not written down in any draft)
// 	DTNSEC_REQUEST_SIGN(1 << 0x1A),
// 	DTNSEC_REQUEST_ENCRYPT(1 << 0x1B),
// 	DTNSEC_STATUS_VERIFIED(1 << 0x1C),
// 	DTNSEC_STATUS_CONFIDENTIAL(1 << 0x1D),
// 	DTNSEC_STATUS_AUTHENTICATED(1 << 0x1E),
// 	IBRDTN_REQUEST_COMPRESSION(1 << 0x1F);
// 
// 	private int value = 0;
// 
// 	private ProcFlags(int i) {
// 		this.value = i;
// 	}
// 
// 	public int getValue() {
// 		return this.value;
// 	}
// };


import android.os.Parcel;
import android.os.Parcelable;
import de.tubs.ibr.dtn.api.Bundle.ProcFlags;
import java.util.StringTokenizer;

	    if (count > 3) {
	        // bundle id belongs to a fragment
	        ret.fragment = true;
	        
	        // read the fragment offset
	        ret.fragment_offset = Long.valueOf(tokenizer.nextToken());
	        
            // read the fragment payload
            ret.fragment_payload = Long.valueOf(tokenizer.nextToken());
	    } else {
	        ret.fragment = false;
	        ret.fragment_offset = 0L;
	        ret.fragment_payload = 0L;
	    }
	    
	    // read the source endpoint
	    ret.source = new SingletonEndpoint(tokenizer.nextToken());

	    return ret;
	}

	public Timestamp getTimestamp() {
		return timestamp;
	}

	public void setTimestamp(Timestamp timestamp) {
		this.timestamp = timestamp;
	}

// Path: library/src/main/java/de/tubs/ibr/dtn/api/Bundle.java
// public enum ProcFlags {
// 	FRAGMENT(1 << 0x00),
// 	APPDATA_IS_ADMRECORD(1 << 0x01),
// 	DONT_FRAGMENT(1 << 0x02),
// 	CUSTODY_REQUESTED(1 << 0x03),
// 	DESTINATION_IS_SINGLETON(1 << 0x04),
// 	ACKOFAPP_REQUESTED(1 << 0x05),
// 	RESERVED_6(1 << 0x06),
// 	PRIORITY_BIT1(1 << 0x07),
// 	PRIORITY_BIT2(1 << 0x08),
// 	CLASSOFSERVICE_9(1 << 0x09),
// 	CLASSOFSERVICE_10(1 << 0x0A),
// 	CLASSOFSERVICE_11(1 << 0x0B),
// 	CLASSOFSERVICE_12(1 << 0x0C),
// 	CLASSOFSERVICE_13(1 << 0x0D),
// 	REQUEST_REPORT_OF_BUNDLE_RECEPTION(1 << 0x0E),
// 	REQUEST_REPORT_OF_CUSTODY_ACCEPTANCE(1 << 0x0F),
// 	REQUEST_REPORT_OF_BUNDLE_FORWARDING(1 << 0x10),
// 	REQUEST_REPORT_OF_BUNDLE_DELIVERY(1 << 0x11),
// 	REQUEST_REPORT_OF_BUNDLE_DELETION(1 << 0x12),
// 	STATUS_REPORT_REQUEST_19(1 << 0x13),
// 	STATUS_REPORT_REQUEST_20(1 << 0x14),
// 
// 	// DTNSEC FLAGS (these are customized flags and not written down in any draft)
// 	DTNSEC_REQUEST_SIGN(1 << 0x1A),
// 	DTNSEC_REQUEST_ENCRYPT(1 << 0x1B),
// 	DTNSEC_STATUS_VERIFIED(1 << 0x1C),
// 	DTNSEC_STATUS_CONFIDENTIAL(1 << 0x1D),
// 	DTNSEC_STATUS_AUTHENTICATED(1 << 0x1E),
// 	IBRDTN_REQUEST_COMPRESSION(1 << 0x1F);
// 
// 	private int value = 0;
// 
// 	private ProcFlags(int i) {
// 		this.value = i;
// 	}
// 
// 	public int getValue() {
// 		return this.value;
// 	}
// };


// Path: library/src/main/java/de/tubs/ibr/dtn/api/BundleID.java
import android.os.Parcel;
import android.os.Parcelable;
import de.tubs.ibr.dtn.api.Bundle.ProcFlags;
import java.util.StringTokenizer;


	    if (count > 3) {
	        // bundle id belongs to a fragment
	        ret.fragment = true;
	        
	        // read the fragment offset
	        ret.fragment_offset = Long.valueOf(tokenizer.nextToken());
	        
            // read the fragment payload
            ret.fragment_payload = Long.valueOf(tokenizer.nextToken());
	    } else {
	        ret.fragment = false;
	        ret.fragment_offset = 0L;
	        ret.fragment_payload = 0L;
	    }
	    
	    // read the source endpoint
	    ret.source = new SingletonEndpoint(tokenizer.nextToken());

	    return ret;
	}

	public Timestamp getTimestamp() {
		return timestamp;
	}

	public void setTimestamp(Timestamp timestamp) {
		this.timestamp = timestamp;
	}

	public Long getSequencenumber() {