Package com.webobjects.foundation

Examples of com.webobjects.foundation.NSMutableData.appendByte()


      // uint64_t _numObjects;
      // uint64_t _topObject;
      // uint64_t _offsetTableOffset;
      // } CFBinaryPlistTrailer;
      theData.appendBytes(new byte[5]);
      theData.appendByte((byte) 0x0); // _sortVersion which AFIK is not being used in CF
      theData.appendByte((byte) intsize); // _offsetIntSize which byte size for all ints in file
      theData.appendByte((byte) refsize); // _objectRefSize which is total # of objects value in bytes
      theData.appendBytes(longToByteArray2(numberOfObjects, 8)); // _numObjects which is object count
      theData.appendBytes(longToByteArray2(theTopObject, 8)); // _topObject appears to be set to 0 in CF
      theData.appendBytes(longToByteArray2(offsetTableStart, 8)); // _offsetTableOffset
View Full Code Here


      // uint64_t _topObject;
      // uint64_t _offsetTableOffset;
      // } CFBinaryPlistTrailer;
      theData.appendBytes(new byte[5]);
      theData.appendByte((byte) 0x0); // _sortVersion which AFIK is not being used in CF
      theData.appendByte((byte) intsize); // _offsetIntSize which byte size for all ints in file
      theData.appendByte((byte) refsize); // _objectRefSize which is total # of objects value in bytes
      theData.appendBytes(longToByteArray2(numberOfObjects, 8)); // _numObjects which is object count
      theData.appendBytes(longToByteArray2(theTopObject, 8)); // _topObject appears to be set to 0 in CF
      theData.appendBytes(longToByteArray2(offsetTableStart, 8)); // _offsetTableOffset
View Full Code Here

      // uint64_t _offsetTableOffset;
      // } CFBinaryPlistTrailer;
      theData.appendBytes(new byte[5]);
      theData.appendByte((byte) 0x0); // _sortVersion which AFIK is not being used in CF
      theData.appendByte((byte) intsize); // _offsetIntSize which byte size for all ints in file
      theData.appendByte((byte) refsize); // _objectRefSize which is total # of objects value in bytes
      theData.appendBytes(longToByteArray2(numberOfObjects, 8)); // _numObjects which is object count
      theData.appendBytes(longToByteArray2(theTopObject, 8)); // _topObject appears to be set to 0 in CF
      theData.appendBytes(longToByteArray2(offsetTableStart, 8)); // _offsetTableOffset

      // write to stream
View Full Code Here

     * @see offsetIntSize
     */
    private byte[] encodeCount(long value, Type marker) {
      NSMutableData data = new NSMutableData(16);
      if (value > IntegerMaxValue) {
        data.appendByte((byte) typeMarker(marker, 0x0f));
        data.appendByte((byte) typeMarker(Type.kCFBinaryPlistMarkerInt, 3));
        data.appendByte((byte) ((value >>> 56) & 0xff));
        data.appendByte((byte) ((value >>> 48) & 0xff));
        data.appendByte((byte) ((value >>> 40) & 0xff));
        data.appendByte((byte) ((value >>> 32) & 0xff));
View Full Code Here

     */
    private byte[] encodeCount(long value, Type marker) {
      NSMutableData data = new NSMutableData(16);
      if (value > IntegerMaxValue) {
        data.appendByte((byte) typeMarker(marker, 0x0f));
        data.appendByte((byte) typeMarker(Type.kCFBinaryPlistMarkerInt, 3));
        data.appendByte((byte) ((value >>> 56) & 0xff));
        data.appendByte((byte) ((value >>> 48) & 0xff));
        data.appendByte((byte) ((value >>> 40) & 0xff));
        data.appendByte((byte) ((value >>> 32) & 0xff));
        data.appendByte((byte) ((value >>> 24) & 0xff));
View Full Code Here

    private byte[] encodeCount(long value, Type marker) {
      NSMutableData data = new NSMutableData(16);
      if (value > IntegerMaxValue) {
        data.appendByte((byte) typeMarker(marker, 0x0f));
        data.appendByte((byte) typeMarker(Type.kCFBinaryPlistMarkerInt, 3));
        data.appendByte((byte) ((value >>> 56) & 0xff));
        data.appendByte((byte) ((value >>> 48) & 0xff));
        data.appendByte((byte) ((value >>> 40) & 0xff));
        data.appendByte((byte) ((value >>> 32) & 0xff));
        data.appendByte((byte) ((value >>> 24) & 0xff));
        data.appendByte((byte) ((value >>> 16) & 0xff));
View Full Code Here

      NSMutableData data = new NSMutableData(16);
      if (value > IntegerMaxValue) {
        data.appendByte((byte) typeMarker(marker, 0x0f));
        data.appendByte((byte) typeMarker(Type.kCFBinaryPlistMarkerInt, 3));
        data.appendByte((byte) ((value >>> 56) & 0xff));
        data.appendByte((byte) ((value >>> 48) & 0xff));
        data.appendByte((byte) ((value >>> 40) & 0xff));
        data.appendByte((byte) ((value >>> 32) & 0xff));
        data.appendByte((byte) ((value >>> 24) & 0xff));
        data.appendByte((byte) ((value >>> 16) & 0xff));
        data.appendByte((byte) ((value >>> 8) & 0xff));
View Full Code Here

      if (value > IntegerMaxValue) {
        data.appendByte((byte) typeMarker(marker, 0x0f));
        data.appendByte((byte) typeMarker(Type.kCFBinaryPlistMarkerInt, 3));
        data.appendByte((byte) ((value >>> 56) & 0xff));
        data.appendByte((byte) ((value >>> 48) & 0xff));
        data.appendByte((byte) ((value >>> 40) & 0xff));
        data.appendByte((byte) ((value >>> 32) & 0xff));
        data.appendByte((byte) ((value >>> 24) & 0xff));
        data.appendByte((byte) ((value >>> 16) & 0xff));
        data.appendByte((byte) ((value >>> 8) & 0xff));
        data.appendByte((byte) ((value >>> 0) & 0xff));
View Full Code Here

        data.appendByte((byte) typeMarker(marker, 0x0f));
        data.appendByte((byte) typeMarker(Type.kCFBinaryPlistMarkerInt, 3));
        data.appendByte((byte) ((value >>> 56) & 0xff));
        data.appendByte((byte) ((value >>> 48) & 0xff));
        data.appendByte((byte) ((value >>> 40) & 0xff));
        data.appendByte((byte) ((value >>> 32) & 0xff));
        data.appendByte((byte) ((value >>> 24) & 0xff));
        data.appendByte((byte) ((value >>> 16) & 0xff));
        data.appendByte((byte) ((value >>> 8) & 0xff));
        data.appendByte((byte) ((value >>> 0) & 0xff));
      } else if (value > ShortMaxValue) {
View Full Code Here

        data.appendByte((byte) typeMarker(Type.kCFBinaryPlistMarkerInt, 3));
        data.appendByte((byte) ((value >>> 56) & 0xff));
        data.appendByte((byte) ((value >>> 48) & 0xff));
        data.appendByte((byte) ((value >>> 40) & 0xff));
        data.appendByte((byte) ((value >>> 32) & 0xff));
        data.appendByte((byte) ((value >>> 24) & 0xff));
        data.appendByte((byte) ((value >>> 16) & 0xff));
        data.appendByte((byte) ((value >>> 8) & 0xff));
        data.appendByte((byte) ((value >>> 0) & 0xff));
      } else if (value > ShortMaxValue) {
        data.appendByte((byte) typeMarker(marker, 0x0f));
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.