Here you can find the source of getCharsetForSortOrder(final int sortOrder)
CharsetInfo
instance asociated with the specified sort order.
Parameter | Description |
---|---|
sortOrder | the server sort order |
CharsetInfo
private static Charset getCharsetForSortOrder(final int sortOrder)
//package com.java2s; // License as published by the Free Software Foundation; either import java.nio.charset.*; public class Main { /** Table of sort code to charset mappings.*/ private static final String[] sortMap = new String[256]; /**/*from w ww. j a v a2 s .c om*/ * Retrieves the <code>CharsetInfo</code> instance asociated with the * specified sort order. * * @param sortOrder the server sort order * @return the associated <code>CharsetInfo</code> */ private static Charset getCharsetForSortOrder(final int sortOrder) { String name = sortMap[sortOrder]; return Charset.forName(name); } }