IT. Expert System.

Android Reference

IntegralToString


java.lang

Class IntegralToString



  • public final class IntegralToString
    extends Object
    Converts integral types to strings. This class is public but hidden so that it can also be used by java.util.Formatter to speed up %d. This class is in java.lang so that it can take advantage of the package-private String constructor. The most important methods are appendInt/appendLong and intToString(int)/longToString(int). The former are used in the implementation of StringBuilder, StringBuffer, and Formatter, while the latter are used by Integer.toString and Long.toString. The append methods take AbstractStringBuilder rather than Appendable because the latter requires CharSequences, while we only have raw char[]s. Since much of the savings come from not creating any garbage, we can't afford temporary CharSequence instances. One day the performance advantage of the binary/hex/octal specializations will be small enough that we can lose the duplication, but until then this class offers the full set.
    • Method Detail

      • intToString

        public static String intToString(int i,
                         int radix)
        Equivalent to Integer.toString(i, radix).
      • intToString

        public static String intToString(int i)
        Equivalent to Integer.toString(i).
      • appendInt

        public static void appendInt(java.lang.AbstractStringBuilder sb,
                     int i)
        Equivalent to sb.append(Integer.toString(i)).
      • longToString

        public static String longToString(long v,
                          int radix)
        Equivalent to Long.toString(v, radix).
      • longToString

        public static String longToString(long l)
        Equivalent to Long.toString(l).
      • appendLong

        public static void appendLong(java.lang.AbstractStringBuilder sb,
                      long l)
        Equivalent to sb.append(Long.toString(l)).
      • intToBinaryString

        public static String intToBinaryString(int i)
      • longToBinaryString

        public static String longToBinaryString(long v)
      • byteToHexString

        public static String byteToHexString(byte b,
                             boolean upperCase)
      • bytesToHexString

        public static String bytesToHexString(byte[] bytes,
                              boolean upperCase)
      • intToHexString

        public static String intToHexString(int i,
                            boolean upperCase,
                            int minWidth)
      • longToHexString

        public static String longToHexString(long v)
      • intToOctalString

        public static String intToOctalString(int i)
      • longToOctalString

        public static String longToOctalString(long v)


Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 3251 / . Delta: 0.02003 с