Examples of formatMessage()


Examples of com.sun.jna.examples.win32.Kernel32.FormatMessage()

            watcher = null;
        }
        private String getSystemError(int code) {
            Kernel32 lib = Kernel32.INSTANCE;
            PointerByReference pref = new PointerByReference();
            lib.FormatMessage(Kernel32.FORMAT_MESSAGE_ALLOCATE_BUFFER
                              |Kernel32.FORMAT_MESSAGE_FROM_SYSTEM
                              |Kernel32.FORMAT_MESSAGE_IGNORE_INSERTS,
                              null, code,
                              0, pref, 0, null);
            String s = pref.getValue().getString(0, !Boolean.getBoolean("w32.ascii"));
View Full Code Here

Examples of com.sun.org.apache.xerces.internal.util.MessageFormatter.formatMessage()

        // format error message and create parse exception
        MessageFormatter messageFormatter = getMessageFormatter(domain);
        String message;
        if (messageFormatter != null) {
            message = messageFormatter.formatMessage(fLocale, key, arguments);
        }
        else {
            StringBuffer str = new StringBuffer();
            str.append(domain);
            str.append('#');
View Full Code Here

Examples of com.sun.org.apache.xerces.internal.util.MessageFormatter.formatMessage()

            // attempt to include a fallback if there is one.
            if (javaEncoding == null) {
                MessageFormatter aFormatter =
                    fErrorReporter.getMessageFormatter(XMLMessageFormatter.XML_DOMAIN);
                Locale aLocale = fErrorReporter.getLocale();
                throw new IOException( aFormatter.formatMessage( aLocale,
                    "EncodingDeclInvalid",
                    new Object[] {encoding} ) );
            }
            else if (javaEncoding.equals("ASCII")) {
                return new ASCIIReader(stream,
View Full Code Here

Examples of com.sun.org.apache.xerces.internal.util.MessageFormatter.formatMessage()

       
        // format error message and create parse exception
        MessageFormatter messageFormatter = getMessageFormatter(domain);
        String message;
        if (messageFormatter != null) {
            message = messageFormatter.formatMessage(fLocale, key, arguments);
        }
        else {
            StringBuffer str = new StringBuffer();
            str.append(domain);
            str.append('#');
View Full Code Here

Examples of com.sun.org.apache.xerces.internal.util.MessageFormatter.formatMessage()

            // attempt to include a fallback if there is one.
            if (javaEncoding == null) {
                MessageFormatter aFormatter =
                    fErrorReporter.getMessageFormatter(XMLMessageFormatter.XML_DOMAIN);
                Locale aLocale = fErrorReporter.getLocale();
                throw new IOException( aFormatter.formatMessage( aLocale,
                    "EncodingDeclInvalid",
                    new Object[] {encoding} ) );
            }
            else if (javaEncoding.equals("ASCII")) {
                return new ASCIIReader(stream,
View Full Code Here

Examples of com.sun.org.apache.xerces.internal.util.MessageFormatter.formatMessage()

            // attempt to include a fallback if there is one.
            if (javaEncoding == null) {
                MessageFormatter aFormatter =
                    fErrorReporter.getMessageFormatter(XMLMessageFormatter.XML_DOMAIN);
                Locale aLocale = fErrorReporter.getLocale();
                throw new IOException( aFormatter.formatMessage( aLocale,
                    "EncodingDeclInvalid",
                    new Object[] {encoding} ) );
            }
            else if (javaEncoding.equals("ASCII")) {
                return new ASCIIReader(stream,
View Full Code Here

Examples of com.sun.org.apache.xerces.internal.util.MessageFormatter.formatMessage()

        // format error message and create parse exception
        MessageFormatter messageFormatter = getMessageFormatter(domain);
        String message;
        if (messageFormatter != null) {
            message = messageFormatter.formatMessage(fLocale, key, arguments);
        }
        else {
            StringBuffer str = new StringBuffer();
            str.append(domain);
            str.append('#');
View Full Code Here

Examples of java.util.logging.Formatter.formatMessage()

        // Check #7.
        al.setFilter(filter);
        al.setUseParentHandlers(false);
        al.setLevel(Level.FINEST);
        al.entering("Class", "method", "txt");
        th.check(formatter.formatMessage(filter.getLastRecord()), "ENTRY txt");

        // Check #8.
        al = Logger.getAnonymousLogger(TestResourceBundle.class.getName());
        th.check(al.getResourceBundle() instanceof TestResourceBundle);
View Full Code Here

Examples of java.util.logging.Formatter.formatMessage()

        // Check #9.
        al.setFilter(filter);
        al.setUseParentHandlers(false);
        al.setLevel(Level.FINEST);
        al.entering("Class", "method", "txt");
        th.check(formatter.formatMessage(filter.getLastRecord()), "BETRETEN txt");

        // Check #10.
        try
          {
            Logger.getAnonymousLogger("garbageClassName");
View Full Code Here

Examples of java.util.logging.Formatter.formatMessage()

        record.setResourceBundle(logger.getResourceBundle());
        record.setSourceClassName(sourceClassName);
        Formatter formatter = new SimpleFormatter();
       
        return formatter.formatMessage(record);
    }
}
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.