Java String Encode by Charset getEncoder(String charset)

Here you can find the source of getEncoder(String charset)

Description

get Encoder

License

Open Source License

Declaration

public static CharsetEncoder getEncoder(String charset) 

Method Source Code


//package com.java2s;
import java.nio.charset.Charset;

import java.nio.charset.CharsetEncoder;

public class Main {
    public static CharsetEncoder getEncoder(String charset) {
        return Charset.forName(charset).newEncoder();
    }/*from  ww  w . j a  va  2  s .c o m*/
}

Related

  1. encodeOneChar(CharsetEncoder encoder, int uchar)
  2. encoding(final String content, final Charset charset, final boolean blankAsPlus)
  3. ensureEncodingSet(List options, Charset defaultEncoding)
  4. getEncoder(Charset charset)
  5. getEncoder(Charset charset)
  6. getHeader(Charset encoding)
  7. loadAsString(String locationPattern, Charset encoding)
  8. pathEncode(String path, Charset charset)
  9. urlEncode(final String content, final Charset charset, final BitSet safechars, final boolean blankAsPlus)