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

void org::freedesktop::dbus::Message::pad ( byte  type  )  [inline]

Pad the message to the proper alignment for the given type.

Definition at line 713 of file Message.java.

References appendBytes(), getAlignment(), and padding.

Referenced by appendone(), and setSource().

   {
      if (Debug.debug) Debug.print(Debug.VERBOSE, "padding for "+(char)type);
      int a = getAlignment(type);
      if (Debug.debug) Debug.print(Debug.VERBOSE, preallocated+" "+paofs+" "+bytecounter+" "+a);
      int b = (int) ((bytecounter-preallocated)%a);
      if (0 == b) return;
      a = (a-b);
      if (preallocated > 0) {
         paofs += a;
         preallocated -= a;
      } else
         appendBytes(padding[a]);
      if (Debug.debug) Debug.print(Debug.VERBOSE, preallocated+" "+paofs+" "+bytecounter+" "+a);
   }


Generated by  Doxygen 1.6.0   Back to index