This method gets the singleton instance of this {@link EncodingUtilImpl}. <br>
<b>ATTENTION:</b><br>
Please prefer dependency-injection instead of using this method.

@return the singleton instance.
490706
public static EncodingUtil getInstance() {

    if (instance == null) {
      synchronized (EncodingUtilImpl.class) {
        if (instance == null) {
          EncodingUtilImpl util = new EncodingUtilImpl();
          util.initialize();
          instance = util;
        }
      }
    }
    return instance;
  }
366150
public synchronized static Mimetypes getInstance() {
        if (mimetypes != null) return mimetypes;

        mimetypes = new Mimetypes();
        InputStream is = mimetypes.getClass().getResourceAsStream("/mime.types");
        if (is != null) {
            if (log.isDebugEnabled()) {
                log.debug("Loading mime types from file in the classpath: mime.types");
            }
            try {
                mimetypes.loadAndReplaceMimetypes(is);
            } catch (IOException e) {
                if (log.isErrorEnabled()) {
                    log.error("Failed to load mime types from file in the classpath: mime.types", e);
                }
            } finally {
                try { is.close(); } catch (IOException ex) { log.debug("", ex); }
            }
        } else {
            if (log.isWarnEnabled()) {
                log.warn("Unable to find 'mime.types' file in classpath");
            }
        }
        return mimetypes;
    }
791586
public static StreamUtil getInstance() {

    if (instance == null) {
      synchronized (StreamUtilImpl.class) {
        if (instance == null) {
          StreamUtilImpl util = new StreamUtilImpl();
          util.initialize();
          instance = util;
        }
      }
    }
    return instance;
  }
1198172
public static function getInstance() : ISOCurrencyProvider
    {
        if (self::$instance === null) {
            self::$instance = new ISOCurrencyProvider();
        }

        return self::$instance;
    }
144304
static <I, O> CipherExecutor<I, O> getInstance() {
        if (INSTANCE == null) {
            synchronized (NoOpCipherExecutor.class) {
                if (INSTANCE == null) {
                    INSTANCE = new NoOpCipherExecutor<>();
                }
            }
        }
        return INSTANCE;
    }
411527
public static final CPadawan getInstance() {
        try {
            mutex.acquire();

            CPadawan toReturn =
                (handle == null)
                ? (handle = new CPadawan())
                : handle;
            toReturn.init();

            return toReturn;
        } finally {
            try {
                mutex.release();
            } catch (Exception ignore) {
            }
        }
    }
932023
public static Translator<String> getIdentityTranslator()
    {
        return new Translator<String>()
        {
            @Override
            public String getPropertyName(String propertyKey)
            {
                return propertyKey;
            }

            @Override
            public String getPropertyKey(String propertyName)
            {
                return propertyName;
            }
        };
    }
930148
public BufferedReader getReader()
    	throws UnsupportedEncodingException
    {
        if (_inputState!=0 && _inputState!=2)
            throw new IllegalStateException();
        if (_reader==null)
        {
            String encoding=getCharacterEncoding();
            if (encoding==null)
                encoding=StringUtil.__ISO_8859_1;
            _reader=new BufferedReader(new InputStreamReader(getInputStream(),encoding));
            
        }
        _inputState=2;
        return _reader;
    }
537910
public static synchronized final SingletonContext getInstance () {
        if ( INSTANCE == null ) {
            try {
                log.debug("Initializing singleton context");
                init(null);
            }
            catch ( CIFSException e ) {
                log.error("Failed to create singleton JCIFS context", e);
            }
        }
        return INSTANCE;
    }
590236
@Override
	@Nullable
	public String getEncoding() {
		return (this.dataSource instanceof EncodingAware) ? ((EncodingAware) this.dataSource).getEncoding() : null;
	}
1014641
public static EncodedElement getIdentifier() {
    EncodedElement ele = new EncodedElement();
    ele.setData(marker.clone());
    ele.setUsableBits(32);
    return ele;
  }
1225654
@Override
	public Object getInstance() {
		final String sourceMethod = "getInstance"; //$NON-NLS-1$
		boolean isTraceLogging = log.isLoggable(Level.FINER);
		if (isTraceLogging) {
			log.entering(AggregatorExtension.class.getName(), sourceMethod);
			log.exiting(AggregatorExtension.class.getName(), sourceMethod, instance);
		}
		return instance;
	}
890159
public static PojoUtil getInstance() {

    if (instance == null) {
      PojoUtilImpl impl = null;
      synchronized (PojoUtilImpl.class) {
        if (instance == null) {
          impl = new PojoUtilImpl();
          impl.initialize();
          instance = impl;
        }
      }
    }
    return instance;
  }
198250
public static EncodingUtils getEncodingUtils() {
        HttpDispatcher f = instance.get().get();
        EncodingUtils svc = null;
        if (f != null) {
            svc = f.encodingSvc;
        }

        if (svc == null)
            svc = new EncodingUtilsImpl();

        return svc;
    }
846808
public static JsonUtil getInstance() {

    if (instance == null) {
      synchronized (JsonUtilImpl.class) {
        if (instance == null) {
          JsonUtilImpl impl = new JsonUtilImpl();
          impl.initialize();
        }
      }
    }
    return instance;
  }
722052
public static final Parser<BigDecimal> instance() { // NOPMD it's thread save!
    if (PercentBigDecimalParser.instanceParser == null) {
      synchronized (PercentBigDecimalParser.class) {
        if (PercentBigDecimalParser.instanceParser == null) {
          PercentBigDecimalParser.instanceParser = new PercentBigDecimalParser();
        }
      }
    }
    return PercentBigDecimalParser.instanceParser;
  }
596312
public static EncodingReader getReadFactory(final String encoding)
    throws UnsupportedEncodingException
  {
    String encKey = encoding == null ? "iso-8859-1" : encoding;

    EncodingReader factory = _readEncodingFactories.get(encKey);

    if (factory == null) {
      try {
        String javaEncoding = Encoding.getJavaName(encoding);

        if (javaEncoding == null)
          javaEncoding = "ISO8859_1";

        String className = "com.caucho.v5.vfs.i18n." + javaEncoding + "Reader";

        Class<?> cl = Class.forName(className);

        factory = (EncodingReader) cl.newInstance();
        factory.setJavaEncoding(javaEncoding);
      } catch (Throwable e) {
      }

      if (factory == null) {
        String javaEncoding = Encoding.getJavaName(encoding);

        if (javaEncoding == null)
          javaEncoding = "ISO8859_1";

        factory = new JDKReader();
        factory.setJavaEncoding(javaEncoding);
      }

      _readEncodingFactories.put(encKey, factory);
    }

    return factory;
  }