Searched defs:format (Results 1 - 25 of 57) sorted by relevance

123

/libcore/ojluni/src/main/java/java/util/logging/
H A DSimpleFormatter.java36 * format. The summary will typically be 1 or 2 lines.
42 * <a href="../Formatter.html#syntax">format string</a>
43 * specified in the {@code java.util.logging.SimpleFormatter.format}
44 * property to {@linkplain #format format} the log messages.
50 * the format string specified in the system property will be used.
51 * If this property is not defined or the given format string
53 * the default format is implementation-specific.
61 // format string for printing the log record
62 private static final String format field in class:SimpleFormatter
140 public synchronized String format(LogRecord record) { method in class:SimpleFormatter
[all...]
H A DFormatter.java57 * convenience method to localize and format the message field.
62 public abstract String format(LogRecord record); method in class:Formatter
93 * Localize and format the message string from a log record. This
97 * The message string is first localized to a format string using
100 * format string.) The format String uses java.text style
105 * java.text.MessageFormat is used to format the string.
114 String format = record.getMessage();
118 format = catalog.getString(record.getMessage());
120 // Drop through. Use record message as format
[all...]
H A DXMLFormatter.java34 * Format a LogRecord into a standard XML format.
57 // Append the time and date in ISO 8601 format
99 * convenience method to localize and format the message field.
104 public String format(LogRecord record) { method in class:XMLFormatter
176 // Check to see if the parameter was not a messagetext format
/libcore/luni/src/main/java/libcore/icu/
H A DDateTimeFormat.java43 public static String format(ULocale icuLocale, Calendar time, int flags, method in class:DateTimeFormat
55 return formatter.format(time);
/libcore/luni/src/main/java/libcore/net/http/
H A DHttpDate.java32 * Most websites serve cookies in the blessed format. Eagerly create the parser to ensure such
45 * If we fail to parse a date in a non-standard format, try each of these formats in sequence.
63 /* RI bug 6641315 claims a cookie of this format was once served by www.yahoo.com */
88 public static String format(Date value) { method in class:HttpDate
89 return STANDARD_DATE_FORMAT.get().format(value);
/libcore/luni/src/test/java/libcore/java/text/
H A DOldDecimalFormatTestICU.java32 DecimalFormat format; field in class:OldDecimalFormatTestICU
35 format = (DecimalFormat) NumberFormat.getNumberInstance();
40 DecimalFormat format = (DecimalFormat) NumberFormat
43 format.applyPattern("@@@");
44 assertEquals("sigDigit doesn't work", "12300", format.format(12345));
45 assertEquals("sigDigit doesn't work", "0.123", format.format(0.12345));
47 format.applyPattern("@@##");
48 assertEquals("sigDigit doesn't work", "3.142", format
[all...]
H A DOldFormatTest.java31 public StringBuffer format(Object obj, StringBuffer toAppendTo, method in class:OldFormatTest.MockFormat
62 assertEquals("", mf.format(""));
63 assertTrue("It calls an abstract metod format", true);
H A DOldDateFormatTest.java46 public StringBuffer format(Date date, StringBuffer toAppendTo, method in class:OldDateFormatTest.MockDateFormat
71 DateFormat format = DateFormat.getInstance();
72 DateFormat clone = (DateFormat) format.clone();
73 assertTrue("Clone and parent are not equaled", format.equals(clone));
76 format.setCalendar(Calendar.getInstance());
77 assertTrue("Clone and parent are not equaled", format.equals(clone));
84 * java.text.DateFormat#format(java.util.Date) Test of method
85 * java.text.DateFormat#format(java.util.Date).
91 DateFormat format = DateFormat.getDateTimeInstance(
94 String dtf = format
[all...]
/libcore/ojluni/src/main/java/java/security/
H A DAlgorithmParametersSpi.java68 * according to the primary decoding format for parameters.
69 * The primary decoding format for parameters is ASN.1, if an ASN.1
81 * decodes them according to the specified decoding format.
82 * If <code>format</code> is null, the
83 * primary decoding format for parameters is used. The primary decoding
84 * format is ASN.1, if an ASN.1 specification for these parameters
89 * @param format the name of the decoding format.
93 protected abstract void engineInit(byte[] params, String format) argument
119 * Returns the parameters in their primary encoding format
142 engineGetEncoded(String format) argument
[all...]
H A DKeyRep.java98 * The Key encoding format
102 private String format; field in class:KeyRep
119 * @param format the encoding format returned from
127 * if format is <code>null</code>,
131 String format, byte[] encoded) {
134 format == null || encoded == null) {
140 this.format = format.toUpperCase();
147 * <p> This method supports three Type/format combination
130 KeyRep(Type type, String algorithm, String format, byte[] encoded) argument
[all...]
H A DAlgorithmParameters.java326 * primary decoding format for parameters. The primary decoding
327 * format for parameters is ASN.1, if an ASN.1 specification for this type
345 * If <code>format</code> is null, the
346 * primary decoding format for parameters is used. The primary decoding
347 * format is ASN.1, if an ASN.1 specification for these parameters
352 * @param format the name of the decoding scheme.
357 public final void init(byte[] params, String format) throws IOException { argument
360 paramSpi.engineInit(params, format);
392 * Returns the parameters in their primary encoding format.
393 * The primary encoding format fo
423 getEncoded(String format) argument
[all...]
/libcore/benchmarks/src/benchmarks/regression/
H A DDateToStringBenchmark.java19 import android.text.format.DateFormat;
29 SimpleDateFormat format; field in class:DateToStringBenchmark
36 format = new SimpleDateFormat("EEE MMM dd HH:mm:ss zzz yyyy");
47 new SimpleDateFormat("EEE MMM dd HH:mm:ss zzz yyyy").format(date);
53 ((SimpleDateFormat) format.clone()).format(date);
59 DateFormat.format("EEE MMM dd HH:mm:ss zzz yyyy", calendar);
/libcore/support/src/test/java/org/apache/harmony/security/tests/support/
H A DPrivateKeyStub.java36 String format = null; field in class:PrivateKeyStub
44 * @param format
47 public PrivateKeyStub(String algorithm, String format, byte[] encoded) { argument
49 this.format = format;
62 * Returns format
66 return format;
H A DPublicKeyStub.java39 String format = null; field in class:PublicKeyStub
45 public PublicKeyStub(String algorithm, String format, byte[] encoded) { argument
47 this.format = format;
59 * returns format
63 return format;
H A DCertificateStub.java39 String format; field in class:CertificateStub
44 public CertificateStub(String format, Principal guarantor, Principal principal, PublicKey key){ argument
45 this.format = format;
76 return format;
H A DMyKeyPairGenerator1.java97 private String format; field in class:MyKeyPairGenerator1.PubKey
103 this.format = "test1";
112 return format;
123 private String format; field in class:MyKeyPairGenerator1.PrivKey
129 this.format = "test1";
138 return format;
/libcore/luni/src/test/java/libcore/java/util/logging/
H A DOldFormatterTest.java60 // The RI fails in this test because it uses a MessageFormat to format
70 public String format(LogRecord arg0) { method in class:OldFormatterTest.MockFormatter
71 return "format";
H A DOldFileHandlerTest.java359 sb.append(formatter.format(lr[i]));
481 public String format(LogRecord r) { method in class:OldFileHandlerTest.MockFormatter
/libcore/luni/src/test/java/org/apache/harmony/security/tests/java/security/
H A DAlgorithmParametersSpiTest.java57 protected void engineInit(byte[] params, String format){ argument
65 protected byte[] engineGetEncoded(String format){ argument
H A DKeyRepTest.java58 fail("NullPointerException has not been thrown (format)");
72 fail("NotSerializableException has not been thrown (no format)");
79 fail("NotSerializableException has not been thrown (unacceptable format)");
95 fail("NotSerializableException has not been thrown (no format)");
102 fail("NotSerializableException has not been thrown (unacceptable format)");
118 fail("NotSerializableException has not been thrown (no format)");
125 fail("NotSerializableException has not been thrown (unacceptable format)");
143 fail("NotSerializableException has not been thrown (no format) " + algorithm);
155 fail("NotSerializableException has not been thrown (no format) " + algorithm);
162 public KeyRepChild(KeyRep.Type type, String algorithm, String format, byt argument
[all...]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/text/
H A DSupport_Format.java37 protected void t_FormatWithField(int count, Format format, Object object, argument
41 format.format(object, buffer, pos);
58 protected void t_Format(int count, Object object, Format format, Vector<FieldContainer> expectedResults) { argument
59 Vector<FieldContainer> results = findFields(format.formatToCharacterIterator(object));
61 format.format(object) + "\n" +
/libcore/ojluni/src/main/java/java/text/
H A DFormat.java50 * <code>format</code> method) and for parsing <code>String</code>s back
54 * Generally, a format's <code>parseObject</code> method must be able to parse
55 * any string formatted by its <code>format</code> method. However, there may
57 * <code>format</code> method might create two adjacent integer numbers with
71 * <li> <code>format(Object obj, StringBuffer toAppendTo, FieldPosition pos)</code>
77 * Subclasses often also provide additional <code>format</code> methods for
81 * when no text in the required format is at the beginning of the input text.
87 * <code>getInstance</code> for getting a useful format object appropriate
90 * <code>getInstance(Locale)</code> for getting a useful format
122 * It is recommended to create separate format instance
156 public final String format (Object obj) { method in class:Format
178 public abstract StringBuffer format(Object obj, method in class:Format
[all...]
H A DChoiceFormat.java47 * A <code>ChoiceFormat</code> allows you to attach a format to a range of numbers.
95 * System.out.println(i + " -&gt; " + form.format(i) + " -&gt; "
96 * + form.parse(form.format(i),status));
100 * Here is a more complex example, with a pattern format:
113 * System.out.println(pattform.format(testArgs));
126 * System.out.println("Format with -INF : " + fmt.format(Double.NEGATIVE_INFINITY));
127 * System.out.println("Format with -1.0 : " + fmt.format(-1.0));
128 * System.out.println("Format with 0 : " + fmt.format(0));
129 * System.out.println("Format with 0.9 : " + fmt.format(0.9));
130 * System.out.println("Format with 1.0 : " + fmt.format(
370 public StringBuffer format(long number, StringBuffer toAppendTo, method in class:ChoiceFormat
381 public StringBuffer format(double number, StringBuffer toAppendTo, method in class:ChoiceFormat
[all...]
/libcore/ojluni/src/main/java/javax/security/auth/x500/
H A DX500Principal.java69 * RFC 1779 String format of Distinguished Names.
73 * RFC 2253 String format of Distinguished Names.
77 * Canonical String format of Distinguished Names.
104 * RFC 1779 or RFC 2253 (either format is acceptable).
108 * (and listed in {@link #getName(String format) getName(String format)}),
114 * @param name an X.500 distinguished name in RFC 1779 or RFC 2253 format
129 * RFC 1779 or RFC 2253 (either format is acceptable).
142 * @param name an X.500 distinguished name in RFC 1779 or RFC 2253 format
270 * the format define
343 getName(String format) argument
390 getName(String format, Map<String, String> oidMap) argument
[all...]
/libcore/support/src/test/java/tests/support/
H A DSupport_Format.java36 protected void t_FormatWithField(int count, Format format, Object object, argument
40 format.format(object, buffer, pos);
59 protected void t_Format(int count, Object object, Format format, argument
61 // System.out.println(format.format(object));
62 Vector<FieldContainer> results = findFields(format.formatToCharacterIterator(object));
65 + format.format(object), compare(results, expectedResults));

Completed in 1892 milliseconds

123