Package com.webobjects.foundation

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


        data.appendByte((byte) ((bits >>> 24) & 0xff));
        data.appendByte((byte) ((bits >>> 16) & 0xff));
        data.appendByte((byte) ((bits >>> 8) & 0xff));
        data.appendByte((byte) ((bits >>> 0) & 0xff));
      } else {
        data.appendByte((byte) typeMarker(Type.kCFBinaryPlistMarkerReal, 2));
        int bits = Float.floatToIntBits((float) value);
        data.appendByte((byte) ((bits >>> 24) & 0xff));
        data.appendByte((byte) ((bits >>> 16) & 0xff));
        data.appendByte((byte) ((bits >>> 8) & 0xff));
        data.appendByte((byte) ((bits >>> 0) & 0xff));
View Full Code Here


        data.appendByte((byte) ((bits >>> 8) & 0xff));
        data.appendByte((byte) ((bits >>> 0) & 0xff));
      } else {
        data.appendByte((byte) typeMarker(Type.kCFBinaryPlistMarkerReal, 2));
        int bits = Float.floatToIntBits((float) value);
        data.appendByte((byte) ((bits >>> 24) & 0xff));
        data.appendByte((byte) ((bits >>> 16) & 0xff));
        data.appendByte((byte) ((bits >>> 8) & 0xff));
        data.appendByte((byte) ((bits >>> 0) & 0xff));
      }
      return data.bytes();
View Full Code Here

        data.appendByte((byte) ((bits >>> 0) & 0xff));
      } else {
        data.appendByte((byte) typeMarker(Type.kCFBinaryPlistMarkerReal, 2));
        int bits = Float.floatToIntBits((float) value);
        data.appendByte((byte) ((bits >>> 24) & 0xff));
        data.appendByte((byte) ((bits >>> 16) & 0xff));
        data.appendByte((byte) ((bits >>> 8) & 0xff));
        data.appendByte((byte) ((bits >>> 0) & 0xff));
      }
      return data.bytes();
    }
View Full Code Here

      } else {
        data.appendByte((byte) typeMarker(Type.kCFBinaryPlistMarkerReal, 2));
        int bits = Float.floatToIntBits((float) value);
        data.appendByte((byte) ((bits >>> 24) & 0xff));
        data.appendByte((byte) ((bits >>> 16) & 0xff));
        data.appendByte((byte) ((bits >>> 8) & 0xff));
        data.appendByte((byte) ((bits >>> 0) & 0xff));
      }
      return data.bytes();
    }
View Full Code Here

        data.appendByte((byte) typeMarker(Type.kCFBinaryPlistMarkerReal, 2));
        int bits = Float.floatToIntBits((float) value);
        data.appendByte((byte) ((bits >>> 24) & 0xff));
        data.appendByte((byte) ((bits >>> 16) & 0xff));
        data.appendByte((byte) ((bits >>> 8) & 0xff));
        data.appendByte((byte) ((bits >>> 0) & 0xff));
      }
      return data.bytes();
    }

    /**
 
View Full Code Here

     * date 0011 0011 ... // 8 byte float follows, big-endian bytes
     */
    private byte[] encodeDate(Date value) {
      NSMutableData data = new NSMutableData(16);
      double convertedDate = _convertDate(value);
      data.appendByte((byte) typeMarker(Type.kCFBinaryPlistMarkerDate, 3));

      long bits = Double.doubleToRawLongBits(convertedDate);
      data.appendByte((byte) ((bits >>> 56) & 0xff));
      data.appendByte((byte) ((bits >>> 48) & 0xff));
      data.appendByte((byte) ((bits >>> 40) & 0xff));
View Full Code Here

      NSMutableData data = new NSMutableData(16);
      double convertedDate = _convertDate(value);
      data.appendByte((byte) typeMarker(Type.kCFBinaryPlistMarkerDate, 3));

      long bits = Double.doubleToRawLongBits(convertedDate);
      data.appendByte((byte) ((bits >>> 56) & 0xff));
      data.appendByte((byte) ((bits >>> 48) & 0xff));
      data.appendByte((byte) ((bits >>> 40) & 0xff));
      data.appendByte((byte) ((bits >>> 32) & 0xff));
      data.appendByte((byte) ((bits >>> 24) & 0xff));
      data.appendByte((byte) ((bits >>> 16) & 0xff));
View Full Code Here

      double convertedDate = _convertDate(value);
      data.appendByte((byte) typeMarker(Type.kCFBinaryPlistMarkerDate, 3));

      long bits = Double.doubleToRawLongBits(convertedDate);
      data.appendByte((byte) ((bits >>> 56) & 0xff));
      data.appendByte((byte) ((bits >>> 48) & 0xff));
      data.appendByte((byte) ((bits >>> 40) & 0xff));
      data.appendByte((byte) ((bits >>> 32) & 0xff));
      data.appendByte((byte) ((bits >>> 24) & 0xff));
      data.appendByte((byte) ((bits >>> 16) & 0xff));
      data.appendByte((byte) ((bits >>> 8) & 0xff));
View Full Code Here

      data.appendByte((byte) typeMarker(Type.kCFBinaryPlistMarkerDate, 3));

      long bits = Double.doubleToRawLongBits(convertedDate);
      data.appendByte((byte) ((bits >>> 56) & 0xff));
      data.appendByte((byte) ((bits >>> 48) & 0xff));
      data.appendByte((byte) ((bits >>> 40) & 0xff));
      data.appendByte((byte) ((bits >>> 32) & 0xff));
      data.appendByte((byte) ((bits >>> 24) & 0xff));
      data.appendByte((byte) ((bits >>> 16) & 0xff));
      data.appendByte((byte) ((bits >>> 8) & 0xff));
      data.appendByte((byte) ((bits >>> 0) & 0xff));
View Full Code Here

      long bits = Double.doubleToRawLongBits(convertedDate);
      data.appendByte((byte) ((bits >>> 56) & 0xff));
      data.appendByte((byte) ((bits >>> 48) & 0xff));
      data.appendByte((byte) ((bits >>> 40) & 0xff));
      data.appendByte((byte) ((bits >>> 32) & 0xff));
      data.appendByte((byte) ((bits >>> 24) & 0xff));
      data.appendByte((byte) ((bits >>> 16) & 0xff));
      data.appendByte((byte) ((bits >>> 8) & 0xff));
      data.appendByte((byte) ((bits >>> 0) & 0xff));
      return data.bytes();
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.