Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.distributeme.agents;
 import java.util.Map;

This class contains mobile version of an agent.

public class AgentPackage implements Serializable{
	private static final long serialVersionUID = 42L;
Contains the serialized version of the object.
	private byte[] serializedData;
Class definitions.
	private Map<Stringbyte[]> clazzDefinitions;
The name of the root class of the agent.
	public AgentPackage(){
		 = new HashMap<Stringbyte[]>();
	public String toString(){
		return "Package of class " + +" agent data: "+byte2string()+", classes: "+.keySet();
	private String byte2string(byte[] arr){
		return arr == null ? "null" : arr.length+" bytes";
	public byte[] getSerializedData() {
	public void setSerializedData(byte[] serializedData) {
		this. = serializedData;
	public void addClazzDefinition(String classNamebyte[] data){
	public byte[] getClazzDefinition(String className){
		return .get(className);
	public String getRootClazzName() {
		return ;
	public void setRootClazzName(String rootClazzName) {
		this. = rootClazzName;
	public Map<Stringbyte[]> getClazzDefinitions(){
New to GrepCode? Check out our FAQ X