Examples of format()


Examples of org.apache.commons.httpclient.util.ParameterFormatter.format()

      if(i == 0) {
        finalUrl.append("?");
      } else {
        finalUrl.append("&");
      }
      finalUrl.append(formatter.format(data[i]));
    }

    GetMethod method = new GetMethod(finalUrl.toString());
   
        int statusCode = client.executeMethod(method);
View Full Code Here

Examples of org.apache.commons.lang.time.FastDateFormat.format()

        if (this.timeZone == null) {
          dateformat = FastDateFormat.getInstance(this.logDateFormat);
        } else {
          dateformat = FastDateFormat.getInstance(this.logDateFormat, TimeZone.getTimeZone(this.timeZone));
        }
        paramPut(LOG_TIME, dateformat.format(new Date()));
        this.paramPut(REPLY_TIME,REPLY_TIME);
        this.paramPut(LOG_ID, "0");
  }
 
  /**
 
View Full Code Here

Examples of org.apache.commons.math.util.CompositeFormat.format()

    }

    public void testFormatNumber() {
        CompositeFormat cf = ComplexFormat.getInstance(getLocale());
        Double pi = Double.valueOf(Math.PI);
        String text = cf.format(pi);
        assertEquals("3" + getDecimalCharacter() + "14", text);
    }

    public void testFormatObject() {
        try {
View Full Code Here

Examples of org.apache.felix.service.command.CommandSession.format()

                    } else {
                        result = session.execute(command);
                    }
                    if (result != null)
                    {
                        session.getConsole().println(session.format(result, Converter.INSPECT));
                    }
                } catch (Throwable t) {
                    try {
                        if (t instanceof CommandNotFoundException) {
                            LOGGER.debug("Unknown command entered", t);
View Full Code Here

Examples of org.apache.fop.apps.Driver.format()

      driver.addElementMapping("org.apache.fop.svg.SVGElementMapping");
      driver.addPropertyList("org.apache.fop.fo.StandardPropertyListMapping");
      driver.addPropertyList("org.apache.fop.svg.SVGPropertyListMapping");
      driver.setOutputStream(out);
      driver.buildFOTree(createParser(), foFile);
      driver.format();
      driver.render();
      byte[] content = out.toByteArray();
      response.setContentLength(content.length);
      response.getOutputStream().write(content);
      response.getOutputStream().flush();
View Full Code Here

Examples of org.apache.fop.extensions.ExtensionObj.format()

        a.setFontInfo(fontInfo);

        for(Enumeration e = extensions.elements(); e.hasMoreElements(); ) {
            ExtensionObj ext = (ExtensionObj)e.nextElement();
            try {
                ext.format(a);
            } catch (FOPException fope) {
                throw new SAXException(fope);
            }
        }
View Full Code Here

Examples of org.apache.fop.util.text.AdvancedMessageFormat.format()

        Map params = new java.util.HashMap();
        params.put("node", new Object());
        params.put("elementName", "fo:external-graphic");
        params.put("propertyName", "src");

        msg = format.format(params);
        assertEquals("Element \"fo:external-graphic\" is missing required property \"src\"!", msg);

        params.remove("propertyName");
        msg = format.format(params);
        assertEquals("Element \"fo:external-graphic\" is missing!", msg);
View Full Code Here

Examples of org.apache.ftpserver.command.impl.listing.FileFormater.format()

            if (file != null && file.doesExist()) {
                FileFormater formater = new MLSTFileFormater((String[]) session
                        .getAttribute("MLST.types"));
                session.write(LocalizedFtpReply.translate(session, request, context,
                        FtpReply.REPLY_250_REQUESTED_FILE_ACTION_OKAY, "MLST",
                        formater.format(file)));
            } else {
                session
                        .write(LocalizedFtpReply
                                .translate(
                                        session,
View Full Code Here

Examples of org.apache.ftpserver.command.impl.listing.MLSTFileFormater.format()

            if (file != null && file.doesExist()) {
                FileFormater formater = new MLSTFileFormater((String[]) session
                        .getAttribute("MLST.types"));
                session.write(LocalizedFtpReply.translate(session, request, context,
                        FtpReply.REPLY_250_REQUESTED_FILE_ACTION_OKAY, "MLST",
                        formater.format(file)));
            } else {
                session
                        .write(LocalizedFtpReply
                                .translate(
                                        session,
View Full Code Here

Examples of org.apache.ftpserver.listing.FileFormater.format()

        FileObject file = null;
        try {
            file = session.getFileSystemView().getFileObject(parsedArg.getFile());
            if(file != null && file.doesExist()) {
                FileFormater formater = new MLSTFileFormater((String[])session.getAttribute("MLST.types"));
                session.write(FtpReplyUtil.translate(session, request, context, FtpReply.REPLY_250_REQUESTED_FILE_ACTION_OKAY, "MLST", formater.format(file)));
            } else {           
                session.write(FtpReplyUtil.translate(session, request, context, FtpReply.REPLY_501_SYNTAX_ERROR_IN_PARAMETERS_OR_ARGUMENTS, "MLST", null));
            }
        }
        catch(FtpException ex) {
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.