Examples of format()


Examples of org.apache.ftpserver.listing.MLSTFileFormater.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

Examples of org.apache.hadoop.hdfs.qjournal.client.QuorumJournalManager.format()

    MiniJournalCluster cluster = new MiniJournalCluster.Builder(conf).build();
    URI uri = cluster.getQuorumJournalURI(JID);
    QuorumJournalManager qjm = new QuorumJournalManager(
        conf, uri, FAKE_NSINFO);
    try {
      qjm.format(FAKE_NSINFO);
    } finally {
      qjm.close();
    }
   
    try {
View Full Code Here

Examples of org.apache.hadoop.hdfs.server.namenode.NNStorage.format()

    long imageTxId = proxy.getMostRecentCheckpointTxId();
    long curTxId = proxy.getTransactionID();
   
    // Format the storage (writes VERSION file)
    NNStorage storage = new NNStorage(conf, dirsToFormat, editUrisToFormat);
    storage.format(nsInfo);

    // Load the newly formatted image, using all of the directories (including shared
    // edits)
    FSImage image = new FSImage(conf);
    assert image.getEditLog().isOpenForRead() :
View Full Code Here

Examples of org.apache.hivemind.Messages.format()

    public void testOneArg() throws Exception
    {
        Messages m = read("config/Localized.xml", Locale.ENGLISH);

        assertEquals("[fred]", m.format("one-arg", "fred"));
    }

    public void testTwoArg() throws Exception
    {
        Messages m = read("config/Localized.xml", Locale.ENGLISH);
View Full Code Here

Examples of org.apache.isis.viewer.bdd.common.parsers.DateParser.format()

                if (expectedDate != null) {
                    if (expectedDate.compareTo(resultDate) == 0) {
                        return resultAdapter; // ok
                    }
                }
                final String format = dateParser.format(resultDate);
                throw ScenarioBoundValueException.current(arg0Binding, format);
            }

            // otherwise, compare title
            if (!StringUtils.nullSafeEquals(resultTitle, expected)) {
View Full Code Here

Examples of org.apache.james.imapserver.store.MessageFlags.format()

            response.append( fetchElement.getResponseName() );
            response.append( SP );

            if ( fetchElement == FetchElement.FLAGS ) {
                MessageFlags flags = message.getFlags();
                response.append( flags.format() );
            }
            else if ( fetchElement == FetchElement.INTERNALDATE ) {
                // TODO format properly
                String internalDate = message.getAttributes().getInternalDateAsString();
                response.append( "\"" );
View Full Code Here

Examples of org.apache.jena.riot.out.NodeFormatterTTL.format()

                Node n = b.get(v) ;
                if ( n != null )
                {
                    // This will not include a raw tab.
                    formatter.format(w, n);
                }
            }
            w.write(NL) ;
        }
View Full Code Here

Examples of org.apache.karaf.shell.console.impl.jline.ConsoleImpl.DelegateSession.format()

        assertEquals("getConsole", ts.lastInvoked);

        ds.get("xyz");
        assertEquals("get(xyz)", ts.lastInvoked);

        ds.format("foo", 12);
        assertEquals("format(foo,12)", ts.lastInvoked);

        ds.convert(TestSession.class, "a string");
        assertEquals("convert(TestSession,a string)", ts.lastInvoked);
    }
View Full Code Here

Examples of org.apache.log.format.Formatter.format()

    public void testRawFormatter()
    {
        final Formatter formatter = new RawFormatter();

        final String result1 = formatter.format( E1 );
        final String result2 = formatter.format( E2 );
        final String result3 = formatter.format( E3 );

        assertEquals( "Raw formatting of E1", E1.getMessage(), result1 );
        assertEquals( "Raw formatting of E2", E2.getMessage(), result2 );
View Full Code Here

Examples of org.apache.log.format.PatternFormatter.format()

    public void testPattern1Formatter()
    {
        final Formatter formatter = new PatternFormatter( PATTERN1 );

        final String result1 = formatter.format( E1 );
        final String result2 = formatter.format( E2 );
        final String result3 = formatter.format( E3 );

        assertEquals( "Pattern1 formatting of E1", E1_PATTERN1, result1 );
        assertEquals( "Pattern1 formatting of E2", E2_PATTERN1, result2 );
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.