added in API level 1

com.android.internal.util

Interfaces

DumpUtils.Dump  
FileRotator.Reader External class that reads data from a given InputStream
FileRotator.Rewriter External class that reads existing data from given InputStream, then writes any modified data to OutputStream
FileRotator.Writer External class that writes data to a given OutputStream
FunctionalUtils.RemoteExceptionIgnoringConsumer<T> A Consumer that automatically ignores any RemoteExceptions. 
FunctionalUtils.ThrowingConsumer<T> A Consumer that allows throwing checked exceptions from its single abstract method. 
FunctionalUtils.ThrowingRunnable An equivalent of Runnable that allows throwing checked exceptions This can be used to specify a lambda argument without forcing all the checked exceptions to be handled within it  
FunctionalUtils.ThrowingSupplier<T> An equivalent of Supplier that allows throwing checked exceptions This can be used to specify a lambda argument without forcing all the checked exceptions to be handled within it  
Predicate<T> This interface was deprecated in API level 26. Use java.util.function.Predicate instead. This must not be used outside frameworks/base/test-runner.  

Classes

ArrayUtils ArrayUtils contains some methods that you can call to find out the most efficient increments by which to grow arrays. 
AsyncChannel

An asynchronous channel between two handlers. 

AsyncService A service that receives Intents and IBinder transactions as messages via an AsyncChannel. 
AsyncService.AsyncServiceInfo  
BitwiseInputStream An object that provides bitwise incremental read access to a byte array. 
BitwiseOutputStream An object that provides bitwise incremental write access to a byte array. 
CallbackRegistry<C, T, A> Tracks callbacks for the event. 
CharSequences CharSequence utility methods. 
CollectionUtils Utility methods for dealing with (typically Nullable) Collections Unless a method specifies otherwise, a null value for a collection is treated as an empty collection of that type. 
DumpUtils Helper functions for dumping the state of system services. 
ExponentiallyBucketedHistogram A histogram for positive integers where each bucket is twice the size of the previous one. 
FastMath Fast and loose math routines. 
FastPrintWriter  
FastXmlSerializer This is a quick and dirty implementation of XmlSerializer that isn't horribly painfully slow like the normal one. 
FileRotator Utility that rotates files over time, similar to logrotate
FunctionalUtils Utilities specific to functional programming  
HexDump  
IndentingPrintWriter Lightweight wrapper around PrintWriter that automatically indents newlines based on internal state. 
JournaledFile This class is deprecated. Use AtomicFile instead. It would be nice to update all existing uses of this to switch to AtomicFile, but since their on-file semantics are slightly different that would run the risk of losing data if at the point of the platform upgrade to the new code it would need to roll back to the backup file. This can be solved... but is it worth it and all of the testing needed to make sure it is correct?  
LatencyTracker Class to track various latencies in SystemUI. 
LineBreakBufferedWriter A writer that breaks up its output into chunks before writing to its out writer, and which is linebreak aware, i.e., chunks will created along line breaks, if possible. 
MessageUtils Static utility class for dealing with Message objects. 
MimeIconUtils  
NotificationMessagingUtil A util to look up messaging related functions for notifications. 
Preconditions Simple static methods to be called at the start of your own methods to verify correct arguments and state. 
ProcFileReader Reader that specializes in parsing /proc/ files quickly. 
ScreenshotHelper  
SizedInputStream Reads exact number of bytes from wrapped stream, returning EOF once those bytes have been read. 
TypedProperties A Map that publishes a set of typed properties, defined by zero or more Readers containing textual definitions and assignments. 
UserIcons Helper class that generates default user icons. 
VirtualRefBasePtr Helper class that contains a strong reference to a VirtualRefBase native object. 

Exceptions

TypedProperties.ParseException An unchecked exception that is thrown when encountering a syntax or semantic error in the input. 
TypedProperties.TypeException An unchecked exception that is thrown if a get<TYPE>() method is used to retrieve a parameter whose type does not match the method name. 

Errors

MessageUtils.DuplicateConstantError Thrown when two different constants have the same value. 
  • Interfaces

    • DumpUtils.Dump
    • FileRotator.Reader
    • FileRotator.Rewriter
    • FileRotator.Writer
    • FunctionalUtils.RemoteExceptionIgnoringConsumer
    • FunctionalUtils.ThrowingConsumer
    • FunctionalUtils.ThrowingRunnable
    • FunctionalUtils.ThrowingSupplier
    • Predicate
  • Classes

    • ArrayUtils
    • AsyncChannel
    • AsyncService
    • AsyncService.AsyncServiceInfo
    • BitwiseInputStream
    • BitwiseOutputStream
    • CallbackRegistry
    • CharSequences
    • CollectionUtils
    • DumpUtils
    • ExponentiallyBucketedHistogram
    • FastMath
    • FastPrintWriter
    • FastXmlSerializer
    • FileRotator
    • FunctionalUtils
    • HexDump
    • IndentingPrintWriter
    • JournaledFile
    • LatencyTracker
    • LineBreakBufferedWriter
    • MessageUtils
    • MimeIconUtils
    • NotificationMessagingUtil
    • Preconditions
    • ProcFileReader
    • ScreenshotHelper
    • SizedInputStream
    • TypedProperties
    • UserIcons
    • VirtualRefBasePtr
  • Exceptions

    • TypedProperties.ParseException
    • TypedProperties.TypeException
  • Errors

    • MessageUtils.DuplicateConstantError