Beispiel #1
0
 @Override
 public Object clone() {
   try {
     ByteQueue clone = (ByteQueue) super.clone();
     // Array is mutable, so make a copy of it too.
     clone.queue = queue.clone();
     return clone;
   } catch (CloneNotSupportedException e) {
     /* Will never happen because we're Cloneable */
   }
   return null;
 }
Beispiel #2
0
 public void push(ByteQueue source, int len) {
   // TODO There is certainly a more elegant way to do this...
   while (len-- > 0) push(source.pop());
 }