Examples of NSData


Examples of com.dd.plist.NSData

  private final String destinationKey;
  private final JSONObject message;

  public ApplicationDataMessage(String rawMessage) throws Exception {
    super(rawMessage);
    NSData data = (NSData) arguments.objectForKey("WIRMessageDataKey");
    String encoded = data.getBase64EncodedData();
    byte[] bytes = Base64.decodeBase64(encoded);
    String s = new String(bytes);
    message = new JSONObject(s);
    destinationKey = arguments.objectForKey("WIRDestinationKey").toString();
    if (log.isLoggable(Level.FINEST)) {
View Full Code Here

Examples of com.dyn.client.v3.traffic.domain.rdata.NSData

      checkNotNull(rdata.getExchange(), "rdata.exchange cannot be null for MXRecord: %s", record);
      return record;
   }

   private Record<NSData> checkNSRecord(Record<NSData> record) {
      NSData rdata = record.getRData();
      checkNotNull(rdata.getNsdname(), "rdata.nsdname cannot be null for NSRecord: %s", record);
      return record;
   }
View Full Code Here

Examples of com.webobjects.foundation.NSData

      if (jdbcInfoStream == null) {
        throw new IllegalStateException("Unable to find 'JDBCInfo.plist' in this plugin jar.");
      }

      try {
        jdbcInfo = (NSDictionary) NSPropertyListSerialization.propertyListFromData(new NSData(jdbcInfoStream, 2048), "US-ASCII");
      }
      catch (IOException e) {
        throw new RuntimeException("Failed to load 'JDBCInfo.plist' from this plugin jar: " + e, e);
      } finally {
        try { jdbcInfoStream.close(); } catch (IOException e) {}
View Full Code Here

Examples of com.webobjects.foundation.NSData

      if (hasBinding("filePath")) {
        setValueForBinding(progress.fileName(), "filePath");
      }

      if (hasBinding("data")) {
        NSData data = new NSData(progress.tempFile().toURI().toURL());
        setValueForBinding(data, "data");
      }
     
      if (hasBinding("mimeType")) {
        String contentType = progress.contentType();
View Full Code Here

Examples of com.webobjects.foundation.NSData

        if (value != null) {
          config.setObjectForKey(value, entry.getKey());
        }
      }
    String xml2fopxsl = stringValueForBinding("xml2fopXsl", component);
    NSData data = null;

    try {
      data = ERPDFUtilities.xml2Fop2Pdf(response.contentString(), xml2fopxsl, config);
      data = appendPDFs(data, context);
    } catch (Throwable e) {
View Full Code Here

Examples of com.webobjects.foundation.NSData

         Object value = association.valueInComponent(component);
         if(value != null) {
           String stringValue;
           if("background-image".equals(key)) {
             if (value instanceof NSData) {
               NSData data = (NSData) value;
               WOResourceManager rm = WOApplication.application().resourceManager();
               String mimeType = (String) (_mimeType != null ? _mimeType.valueInComponent(component) : "image/jpeg");
               WOURLValuedElementData uve = new WOURLValuedElementData(data, mimeType, null);
               rm._cacheData(uve);
               stringValue = uve.dataURL(wocontext);
View Full Code Here

Examples of com.webobjects.foundation.NSData

    ByteArrayOutputStream bout = new ByteArrayOutputStream();
    try {
      ObjectOutputStream oos = new ObjectOutputStream(bout);
      oos.writeObject(d);
      oos.close();
      NSData sp = new NSData(bout.toByteArray());
      return sp;
    }
    catch (IOException e) {
      // shouldn't ever happen, as we only write to memory
      throw NSForwardException._runtimeExceptionForThrowable(e);
View Full Code Here

Examples of com.webobjects.foundation.NSData

      return null;
    }
  }

  public static NSData gzipNSDataAsNSData(NSData data) {
    NSData gzippedData = null;
    if (data != null) {
      gzippedData = ERXCompressionUtilities.gzipByteArrayAsNSData(data._bytesNoCopy(), 0, data.length());
    }
    return gzippedData;
  }
View Full Code Here

Examples of com.webobjects.foundation.NSData

      if (java_class == null) {
        throw new UnmarshallException("no type hint");
      }

      String string = jso.getString("bytes");
      NSData data = (NSData) NSPropertyListSerialization.propertyListFromString(string);
      if (NSData.class.isAssignableFrom(clazz)) {
        return ObjectMatch.OKAY;
      }
      throw new UnmarshallException("invalid class " + clazz);
    }
View Full Code Here

Examples of com.webobjects.foundation.NSData

      if (java_class == null) {
        throw new UnmarshallException("no type hint");
      }

      String string = jso.getString("bytes");
      NSData data = (NSData) NSPropertyListSerialization.propertyListFromString(string);
      if (NSMutableData.class.equals(clazz)) {
        NSMutableData mutableData = new NSMutableData(data);
        state.setSerialized(o, mutableData);
        return mutableData;
      }
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.