public static CharsetDecoderICU newInstance(Charset cs, String icuCanonicalName) { // This complexity is necessary to ensure that even if the constructor, superclass // constructor, or call to updateCallback throw, we still free the native peer. long address = 0; try { address = NativeConverter.openConverter(icuCanonicalName); float averageCharsPerByte = NativeConverter.getAveCharsPerByte(address); CharsetDecoderICU result = new CharsetDecoderICU(cs, averageCharsPerByte, address); address = 0; // CharsetDecoderICU has taken ownership; its finalizer will do the free. result.updateCallback(); return result; } finally { if (address != 0) { NativeConverter.closeConverter(address); } } }
public static CharsetDecoderICU newInstance(Charset cs, String icuCanonicalName) { // This complexity is necessary to ensure that even if the constructor, superclass // constructor, or call to updateCallback throw, we still free the native peer. long address = 0; try { address = NativeConverter.openConverter(icuCanonicalName); float averageCharsPerByte = NativeConverter.getAveCharsPerByte(address); CharsetDecoderICU result = new CharsetDecoderICU(cs, averageCharsPerByte, address); address = 0; // CharsetDecoderICU has taken ownership; its finalizer will do the free. result.updateCallback(); return result; } finally { if (address != 0) { NativeConverter.closeConverter(address); } } }
public static CharsetDecoderICU newInstance(Charset cs, String icuCanonicalName) { // This complexity is necessary to ensure that even if the constructor, superclass // constructor, or call to updateCallback throw, we still free the native peer. long address = 0; try { address = NativeConverter.openConverter(icuCanonicalName); float averageCharsPerByte = NativeConverter.getAveCharsPerByte(address); CharsetDecoderICU result = new CharsetDecoderICU(cs, averageCharsPerByte, address); address = 0; // CharsetDecoderICU has taken ownership; its finalizer will do the free. result.updateCallback(); return result; } finally { if (address != 0) { NativeConverter.closeConverter(address); } } }
public static CharsetDecoderICU newInstance(Charset cs, String icuCanonicalName) { // This complexity is necessary to ensure that even if the constructor, superclass // constructor, or call to updateCallback throw, we still free the native peer. long address = 0; try { address = NativeConverter.openConverter(icuCanonicalName); float averageCharsPerByte = NativeConverter.getAveCharsPerByte(address); CharsetDecoderICU result = new CharsetDecoderICU(cs, averageCharsPerByte, address); address = 0; // CharsetDecoderICU has taken ownership; its finalizer will do the free. result.updateCallback(); return result; } finally { if (address != 0) { NativeConverter.closeConverter(address); } } }
public static CharsetDecoderICU newInstance(Charset cs, String icuCanonicalName) { // This complexity is necessary to ensure that even if the constructor, superclass // constructor, or call to updateCallback throw, we still free the native peer. long address = 0; try { address = NativeConverter.openConverter(icuCanonicalName); float averageCharsPerByte = NativeConverter.getAveCharsPerByte(address); CharsetDecoderICU result = new CharsetDecoderICU(cs, averageCharsPerByte, address); address = 0; // CharsetDecoderICU has taken ownership; its finalizer will do the free. result.updateCallback(); return result; } finally { if (address != 0) { NativeConverter.closeConverter(address); } } }
public static CharsetDecoderICU newInstance(Charset cs, String icuCanonicalName) { // This complexity is necessary to ensure that even if the constructor, superclass // constructor, or call to updateCallback throw, we still free the native peer. long address = 0; try { address = NativeConverter.openConverter(icuCanonicalName); float averageCharsPerByte = NativeConverter.getAveCharsPerByte(address); CharsetDecoderICU result = new CharsetDecoderICU(cs, averageCharsPerByte, address); address = 0; // CharsetDecoderICU has taken ownership; its finalizer will do the free. result.updateCallback(); return result; } finally { if (address != 0) { NativeConverter.closeConverter(address); } } }
public static CharsetDecoderICU newInstance(Charset cs, String icuCanonicalName) { // This complexity is necessary to ensure that even if the constructor, superclass // constructor, or call to updateCallback throw, we still free the native peer. long address = 0; try { address = NativeConverter.openConverter(icuCanonicalName); float averageCharsPerByte = NativeConverter.getAveCharsPerByte(address); CharsetDecoderICU result = new CharsetDecoderICU(cs, averageCharsPerByte, address); address = 0; // CharsetDecoderICU has taken ownership; its finalizer will do the free. result.updateCallback(); return result; } finally { if (address != 0) { NativeConverter.closeConverter(address); } } }