All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.jgroups.tests.bla2 Maven / Gradle / Ivy

Go to download

This artifact provides a single jar that contains all classes required to use remote Jakarta Enterprise Beans and Jakarta Messaging, including all dependencies. It is intended for use by those not using maven, maven users should just import the Jakarta Enterprise Beans and Jakarta Messaging BOM's instead (shaded JAR's cause lots of problems with maven, as it is very easy to inadvertently end up with different versions on classes on the class path).

There is a newer version: 35.0.0.Beta1
Show newest version
package org.jgroups.tests;

/**
 * @author Bela Ban
 * @since x.y
 */
public class bla2 {
   /* public static void main(String[] args) throws Exception {
        ByteArrayDataOutputStream out=new ByteArrayDataOutputStream(1);
        PartialOutputStream pos=new PartialOutputStream(out, 0, 100);

        Person p=new Person("Bela Ban", 53);
        p.writeTo(pos);

        DataInput in=new ByteArrayDataInputStream(out.buffer(),0, out.position());

        Person p2=new Person();
        p2.readFrom(in);
        System.out.printf("p2: %s\n", p2);

    }


    protected static class Person implements Streamable {
        protected int    age;
        protected String name;

        public Person(String name, int age) {
            this.name=name;
            this.age=age;
        }

        public Person() {

        }

        public String toString() {
            return "Person{" +
              "age=" + age +
              ", name='" + name + '\'' +
              '}';
        }

        public void writeTo(DataOutput out) throws Exception {
            out.writeInt(age);
            out.writeUTF(name);
        }

        public void readFrom(DataInput in) throws Exception {
            age=in.readInt();
            name=in.readUTF();
        }
    }*/
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy