/cts/tests/tests/text/src/android/text/format/cts/ |
FormatterTest.java | 23 import android.text.format.Formatter; 29 assertEquals("", Formatter.formatFileSize(null, 0)); 35 assertEquals("0.00B", Formatter.formatFileSize(mContext, 0)); 37 assertEquals("899B", Formatter.formatFileSize(mContext, 899)); 39 assertEquals("1.00KB", Formatter.formatFileSize(mContext, bd.pow(1).longValue())); 41 assertEquals("1.00MB", Formatter.formatFileSize(mContext, bd.pow(2).longValue())); 43 assertEquals("1.00GB", Formatter.formatFileSize(mContext, bd.pow(3).longValue())); 45 assertEquals("1.00TB", Formatter.formatFileSize(mContext, bd.pow(4).longValue())); 47 assertEquals("1.00PB", Formatter.formatFileSize(mContext, bd.pow(5).longValue())); 49 assertEquals("1024PB", Formatter.formatFileSize(mContext, bd.pow(6).longValue())) [all...] |
/libcore/luni/src/main/java/java/util/ |
Formattable.java | 20 * Classes that handle custom formatting for the 's' specifier of {@code Formatter} 24 * @see Formatter 30 * Formats the object using the specified {@code Formatter}. 32 * @param formatter 33 * the {@code Formatter} to use. 57 void formatTo(Formatter formatter, int flags, int width, int precision)
|
Formatter.java | 40 * It's relatively rare to use a {@code Formatter} directly. A variety of classes offer convenience 41 * methods for accessing formatter functionality. 134 * this formatter). 300 * It's also possible to format dates and times with {@code Formatter}, though you should 303 * The facilities offered by {@code Formatter} are low-level and place the burden of localization 513 * {@code %t} with {@code %T} will uppercase the field according to the rules of the formatter's 521 * <p><i>Thread safety</i>. Formatter is not thread-safe. 528 public final class Formatter implements Closeable, Flushable { 598 * Constructs a {@code Formatter}. 606 public Formatter() { [all...] |
/libcore/benchmarks/src/benchmarks/regression/ |
FormatterBenchmark.java | 21 import java.util.Formatter; 25 * Compares Formatter against hand-written StringBuilder code. 30 Formatter f = new Formatter(); 45 Formatter f = new Formatter(); 54 Formatter f = new Formatter(); 71 Formatter f = new Formatter(); [all...] |
/libcore/luni/src/test/java/libcore/java/util/ |
OldFormatterTest.java | 21 import java.util.Formatter; 33 public void formatTo(Formatter formatter, int flags, int width, int precision) throws IllegalFormatException { 35 formatter.out().append("111"); 42 public void formatTo(Formatter formatter, int flags, int width, int precision) throws IllegalFormatException { 44 formatter.out().append("222"); 51 assertEquals("aaa 111?", new Formatter().format("aaa %s?", ones).toString()); 52 assertEquals("aaa 111 bbb 222?", new Formatter().format("aaa %s bbb %s?", ones, twos).toString()); 58 Formatter fLoc = null [all...] |
OldFormattableTest.java | 22 import java.util.Formatter; 29 public void formatTo(Formatter arg0, int arg1, int arg2, int arg3) { 49 Formatter fmt = new Formatter();
|
/external/apache-harmony/luni/src/test/api/common/org/apache/harmony/luni/tests/java/util/ |
FormatterTest.java | 43 import java.util.Formatter; 56 import java.util.Formatter.BigDecimalLayoutForm; 79 public void formatTo(Formatter formatter, int flags, int width, 82 formatter.format("CUSTOMIZED FORMAT FUNCTION" + " WIDTH: " 85 formatter.format("customized format function" + " width: " 156 * @tests java.util.Formatter#Formatter() 159 Formatter f = new Formatter(); 734 Formatter formatter = new Formatter(Locale.US); local [all...] |
/libcore/luni/src/main/java/java/util/logging/ |
Formatter.java | 24 * {@code Formatter} objects are used to format {@link LogRecord} objects into a 29 public abstract class Formatter { 32 * Constructs a {@code Formatter} object. 34 protected Formatter() { 51 * Formatter}.
|
Handler.java | 41 // the formatter used to export messages 42 private Formatter formatter; field in class:Handler 53 * level {@code Level.ALL}. It has no filter and no formatter. 60 this.formatter = null; 95 * init the common properties, including filter, level, formatter, and 128 // set formatter 129 final String formatterName = manager.getProperty(prefix + ".formatter"); 132 formatter = (Formatter) getCustomizeInstance(formatterName) [all...] |
SimpleFormatter.java | 30 public class SimpleFormatter extends Formatter {
|
/dalvik/dx/src/com/android/dx/dex/file/ |
MemberIdsSection.java | 20 import java.util.Formatter; 70 Formatter formatter = new Formatter(); local 72 formatter.format("Too many %s: %d; max is %d. By package:", 75 formatter.format("%n%6d %s", entry.getValue().get(), entry.getKey()); 77 return formatter.toString();
|
/libcore/luni/src/test/java/libcore/java/util/logging/ |
OldFormatterTest.java | 20 import java.util.logging.Formatter; 30 Formatter f = new MockFormatter(); 69 public static class MockFormatter extends Formatter {
|
/frameworks/base/core/java/com/android/internal/logging/ |
AndroidHandler.java | 25 import java.util.logging.Formatter; 86 * Holds the formatter for all Android log handlers. 88 private static final Formatter THE_FORMATTER = new Formatter() { 140 // TODO: avoid ducking into native 2x; we aren't saving any formatter calls
|
/external/jmonkeyengine/engine/src/core/com/jme3/util/ |
JmeFormatter.java | 39 import java.util.logging.Formatter; 43 * More simple formatter than the default one used in Java logging. 47 public class JmeFormatter extends Formatter {
|
/libcore/luni/src/main/java/java/io/ |
Console.java | 18 import java.util.Formatter; 69 * @param format the format string (see {@link java.util.Formatter#format}) 71 * the list of arguments passed to the formatter. If there are 77 Formatter f = new Formatter(writer); 117 * @param format the format string (see {@link java.util.Formatter#format}) 119 * the list of arguments passed to the formatter. If there are 162 * @param format the format string (see {@link java.util.Formatter#format}) 164 * the list of arguments passed to the formatter. If there are
|
/frameworks/base/services/java/com/android/server/ |
DeviceStorageMonitorService.java | 42 import android.text.format.Formatter; 468 pw.print(" mFreeMem="); pw.print(Formatter.formatFileSize(mContext, mFreeMem)); 470 pw.println(Formatter.formatFileSize(mContext, mTotalMemory)); 472 pw.println(Formatter.formatFileSize(mContext, mFreeMemAfterLastCacheClear)); 474 pw.print(Formatter.formatFileSize(mContext, mLastReportedFreeMem)); 483 pw.print(Formatter.formatFileSize(mContext, mMemLowThreshold)); 485 pw.println(Formatter.formatFileSize(mContext, mMemFullThreshold)); 487 pw.print(Formatter.formatFileSize(mContext, mMemCacheStartTrimThreshold)); 489 pw.println(Formatter.formatFileSize(mContext, mMemCacheTrimToThreshold));
|
/external/apache-harmony/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/ |
FormatterTest.java | 23 import java.util.logging.Formatter; 30 Formatter f; 60 String pattern = "test formatter {0, number}"; 127 public static class MockFormatter extends Formatter {
|
/frameworks/base/core/java/android/widget/ |
Chronometer.java | 33 import java.util.Formatter; 70 private Formatter mFormatter; 236 mFormatter = new Formatter(mFormatBuilder, loc);
|
/packages/apps/Bluetooth/src/com/android/bluetooth/opp/ |
BluetoothOppTransferAdapter.java | 44 import android.text.format.Formatter; 111 completeText = r.getString(R.string.download_success, Formatter.formatFileSize( 114 completeText = r.getString(R.string.upload_success, Formatter.formatFileSize(
|
/libcore/luni/src/test/java/libcore/java/lang/ |
SystemTest.java | 26 import java.util.Formatter; 62 // java.util.Formatter --- uses System.lineSeparator on both. 63 assertEquals(System.lineSeparator(), new Formatter().format("%n").toString());
|
/frameworks/base/core/tests/coretests/src/android/text/ |
StaticLayoutDirectionsTest.java | 23 import java.util.Formatter; 112 Formatter f = new Formatter(buf); 227 Directions[] expectedDirs, Formatter f) {
|
/packages/providers/DownloadProvider/src/com/android/providers/downloads/ |
SizeLimitActivity.java | 28 import android.text.format.Formatter; 93 String sizeString = Formatter.formatFileSize(this, size);
|
/frameworks/base/core/java/android/text/format/ |
Formatter.java | 24 * by the {@link java.util.Formatter} class in {@link java.util} 26 public final class Formatter {
|
/packages/apps/Settings/src/com/android/settings/deviceinfo/ |
MiscFilesHandler.java | 24 import android.text.format.Formatter; 182 Formatter.formatFileSize(mContext, selectedDataSize), 183 Formatter.formatFileSize(mContext, mAdapter.getDataSize()))); 254 view.setFileSize(Formatter.formatFileSize(mContext, item.mSize));
|
/frameworks/base/core/java/com/android/internal/os/ |
LoggingPrintStream.java | 28 import java.util.Formatter; 182 private final Formatter formatter = new Formatter(builder, null); field in class:LoggingPrintStream 191 formatter.format(l, format, args);
|