Logo Search packages:      
Sourcecode: dbus-java version File versions  Download package

void org::freedesktop::dbus::Message::appendBytes ( byte[]  buf  )  [inline, protected]

Appends a buffer to the buffer list.

Definition at line 256 of file Message.java.

References BUFFERINCREMENT.

Referenced by appendint(), appendone(), pad(), preallocate(), and setSource().

   {
      if (null == buf) return;
      if (preallocated > 0) {
         if (paofs+buf.length > pabuf.length)
            throw new ArrayIndexOutOfBoundsException(MessageFormat.format(_("Array index out of bounds, paofs={0}, pabuf.length={1}, buf.length={2}."), new Object[] { paofs, pabuf.length, buf.length }));
         System.arraycopy(buf, 0, pabuf, paofs, buf.length);
         paofs += buf.length;
         preallocated -= buf.length;
      } else {
         if (bufferuse == wiredata.length) {
            if (Debug.debug) Debug.print(Debug.VERBOSE, "Resizing "+bufferuse);
            byte[][] temp = new byte[wiredata.length+BUFFERINCREMENT][];
            System.arraycopy(wiredata, 0, temp, 0, wiredata.length);
            wiredata = temp;
         }
         wiredata[bufferuse++] = buf;
         bytecounter += buf.length; 
      }
   }


Generated by  Doxygen 1.6.0   Back to index