With minor modifications , it may be simpler

class ByteArray
{
 private byte[]  array;
 private int counter = 0;
 public ByteArray(int size)
 {
   array = new byte[size];
 }
  public ByteArray add(byte b)
  {
     array[counter]=b;
     counter++;
     return this;
  } 
  public byte[] getArray()
  {
    return array;
  }
}

private static byte[] x = new ByteArray(3).add(1).add(2).add(3).getArray();

Jose M. Arranz


View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3919996#3919996

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3919996


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to