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

123

/libcore/luni/src/main/java/java/util/logging/
H A DSimpleFormatter.java28 * contained in a {@code LogRecord} object in a human readable format.
46 public String format(LogRecord r) { method in class:SimpleFormatter
48 sb.append(MessageFormat.format("{0, date} {0, time} ",
H A DFormatter.java24 * {@code Formatter} objects are used to format {@link LogRecord} objects into a
46 public abstract String format(LogRecord r); method in class:Formatter
78 * format the string
82 pattern = MessageFormat.format(pattern, params);
H A DXMLFormatter.java49 public String format(LogRecord r) { method in class:XMLFormatter
52 // format to date
53 String date = MessageFormat.format("{0, date} {0, time}", new Object[] { new Date(time) });
118 // format throwable's stack trace
/libcore/luni/src/main/java/java/security/
H A DAlgorithmParametersSpi.java48 * {@code byte[]} using the default decoding format for parameters. The
49 * default encoding format is ASN.1.
61 * {@code byte[]} using the specified decoding format.
65 * @param format
66 * the name of the decoding format.
71 protected abstract void engineInit(byte[] params, String format) argument
92 * Returns the parameters in their default encoding format. The default
93 * encoding format is ASN.1.
103 * Returns the parameters in the specified encoding format.
105 * @param format
112 engineGetEncoded(String format) argument
[all...]
H A DKeyRep.java41 // Key encoding format
42 private final String format; field in class:KeyRep
55 * @param format
56 * the format of the key (obtained by {@link Key#getFormat()}).
61 * if {@code type, algorithm, format or encoded} is {@code null}
64 public KeyRep(Type type, String algorithm, String format, byte[] encoded) { argument
67 this.format = format;
75 if(this.format == null) {
76 throw new NullPointerException("format
[all...]
H A DAlgorithmParameters.java200 * byte[]} using the default decoding format for parameters. The default
201 * encoding format is ASN.1.
219 * byte[]} using the specified decoding format.
223 * @param format
224 * the name of the decoding format.
229 public final void init(byte[] params, String format) throws IOException { argument
233 spiImpl.engineInit(params, format);
261 * format. The default encoding format is ASN.1.
277 * format
286 getEncoded(String format) argument
[all...]
/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).
89 DateFormat format = DateFormat.getDateTimeInstance(
92 String dtf = format
[all...]
/libcore/benchmarks/src/benchmarks/regression/
H A DDateToStringBenchmark.java19 import android.text.format.DateFormat;
30 SimpleDateFormat format; field in class:DateToStringBenchmark
37 format = new SimpleDateFormat("EEE MMM dd HH:mm:ss zzz yyyy");
48 new SimpleDateFormat("EEE MMM dd HH:mm:ss zzz yyyy").format(date);
54 ((SimpleDateFormat) format.clone()).format(date);
60 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/main/java/java/text/
H A DFormat.java39 * common US English format for currency values, yielding strings such as
47 * {@code NumberFormat} which allows the user to format different number ranges
50 * is a formatter which utilizes other {@code Format} objects to format a string
70 * @return a shallow copy of this format.
84 * Formats the specified object using the rules of this format.
87 * the object to format.
90 * if the object cannot be formatted by this format.
92 public final String format(Object object) { method in class:Format
93 return format(object, new StringBuffer(), new FieldPosition(0))
99 * rules of this format
117 public abstract StringBuffer format(Object object, StringBuffer buffer, method in class:Format
[all...]
/libcore/luni/src/main/java/org/apache/harmony/security/x501/
H A DName.java104 * the format requested
106 * @param format one of X500Principal.CANONICAL, X500Principal.RFC1779, or
109 public String getName(String format) { argument
113 if (X500Principal.RFC1779.equals(format)) {
116 rfc1779String = getName0(format);
120 } else if (X500Principal.RFC2253.equals(format)) {
123 rfc2253String = getName0(format);
127 } else if (X500Principal.CANONICAL.equals(format)) {
130 canonicalString = getName0(format);
138 else if (X500Principal.RFC1779.equalsIgnoreCase(format)) {
168 getName0(String format) argument
[all...]
/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";
/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/luni/src/main/java/java/io/
H A DConsole.java67 * the specified format string and arguments.
69 * @param format the format string (see {@link java.util.Formatter#format})
72 * more arguments than required by {@code format},
76 public Console format(String format, Object... args) { argument
78 f.format(format, args);
84 * Equivalent to {@code format(forma
86 printf(String format, Object... args) argument
124 readLine(String format, Object... args) argument
169 readPassword(String format, Object... args) argument
[all...]
H A DPrintStream.java29 * writing common data types in a human readable format. This is not to be
267 * Formats {@code args} according to the format string {@code format}, and writes the result
271 * @param format the format string (see {@link java.util.Formatter#format})
274 * more arguments than required by {@code format},
278 * if the format string is illegal or incompatible with the
280 * error regarding the format string or arguments is detected.
281 * @throws NullPointerException if {@code format
283 format(String format, Object... args) argument
306 format(Locale l, String format, Object... args) argument
333 printf(String format, Object... args) argument
356 printf(Locale l, String format, Object... args) argument
[all...]
/libcore/luni/src/main/java/java/sql/
H A DDate.java21 * A class which can consume and produce dates in SQL {@code Date} format.
24 * format only deals with year, month and day values. There are no values for
172 * Produces a string representation of the date in SQL format
174 * @return a string representation of the date in SQL format - {@code "yyyy-MM-dd"}.
180 format((getYear() + 1900), 4, sb);
182 format((getMonth() + 1), 2, sb);
184 format(getDate(), 2, sb);
192 * Private method to format the time
194 private void format(int date, int digits, StringBuilder sb) { method in class:Date
204 * format
[all...]
H A DTime.java24 * format and parse the time's representation as a String in JDBC escape format.
178 * Formats the {@code Time} as a String in JDBC escape format: {@code
182 * format: {@code HH:mm:ss}
188 format(getHours(), 2, sb);
190 format(getMinutes(), 2, sb);
192 format(getSeconds(), 2, sb);
200 * Private method to format the time
202 private void format(int date, int digits, StringBuilder sb) { method in class:Time
212 * JDBC escape format
[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 292 milliseconds

123