Java Byte Array to String by Charset getBytes(String string, Charset charset)

Here you can find the source of getBytes(String string, Charset charset)

Description

get Bytes

License

Apache License

Declaration

private static byte[] getBytes(String string, Charset charset) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.nio.charset.Charset;

public class Main {
    private static byte[] getBytes(String string, Charset charset) {
        return string == null ? null : string.getBytes(charset);
    }//from  w  w w  .  j a  v  a2 s.com
}

Related

  1. encodeB(String prefix, String text, int usedCharacters, Charset charset, byte[] bytes)
  2. encodingIsCorrect(byte[] bytes, String charset)
  3. getAverageBytesPerCharacter(Charset charset)
  4. getBytes(final char[] data, String charset)
  5. getBytes(final String string, final Charset charset)
  6. getBytesByCharset(String str, Charset charset)
  7. getBytesUnchecked(String string, String charsetName)
  8. getBytesUnchecked(String string, String charsetName)
  9. getChars(byte[] data, String charset)