Java UTF8 File Read readStringUTF16LE(byte[] var0, int var1, int var2)

Here you can find the source of readStringUTF16LE(byte[] var0, int var1, int var2)

Description

read String UTFLE

License

Open Source License

Declaration

public static String readStringUTF16LE(byte[] var0, int var1, int var2) 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.nio.charset.Charset;

public class Main {
    public static String readStringUTF16LE(byte[] var0, int var1, int var2) {
        int var3 = 0;

        for (int var4 = 0; var4 < var2; ++var4) {
            if (var0[var1 + var4] == 37) {
                var3 = var4;
                break;
            }/*from w  w w . ja  v a  2  s  .c  om*/
        }

        return new String(var0, var1, var3, Charset.forName("UTF-16LE"));
    }
}

Related

  1. readAsUTF8(String text)
  2. readLines(File inputFile)
  3. readRawUTF8Bytes(final byte[] bytes)
  4. readResourceUtf8(Class contextClass, String filename)
  5. readStringFromUTF8Stream(InputStream is)
  6. readTextFile(File inputFile)
  7. readUTF8(DataInput buf)
  8. readUtf8String(DataInputStream in)
  9. readUTFByteArrayFromDataInput(final DataInput in)