Tabnine Logo
NativeConverter.getMaxBytesPerChar
Code IndexAdd Tabnine to your IDE (free)

How to use
getMaxBytesPerChar
method
in
libcore.icu.NativeConverter

Best Java code snippets using libcore.icu.NativeConverter.getMaxBytesPerChar (Showing top 7 results out of 315)

origin: robovm/robovm

public static CharsetEncoderICU 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 averageBytesPerChar = NativeConverter.getAveBytesPerChar(address);
    float maxBytesPerChar = NativeConverter.getMaxBytesPerChar(address);
    byte[] replacement = makeReplacement(icuCanonicalName, address);
    CharsetEncoderICU result = new CharsetEncoderICU(cs, averageBytesPerChar, maxBytesPerChar, replacement, address);
    address = 0; // CharsetEncoderICU has taken ownership; its finalizer will do the free.
    return result;
  } finally {
    if (address != 0) {
      NativeConverter.closeConverter(address);
    }
  }
}
origin: MobiVM/robovm

public static CharsetEncoderICU 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 averageBytesPerChar = NativeConverter.getAveBytesPerChar(address);
    float maxBytesPerChar = NativeConverter.getMaxBytesPerChar(address);
    byte[] replacement = makeReplacement(icuCanonicalName, address);
    CharsetEncoderICU result = new CharsetEncoderICU(cs, averageBytesPerChar, maxBytesPerChar, replacement, address);
    address = 0; // CharsetEncoderICU has taken ownership; its finalizer will do the free.
    return result;
  } finally {
    if (address != 0) {
      NativeConverter.closeConverter(address);
    }
  }
}
origin: com.bugvm/bugvm-rt

public static CharsetEncoderICU 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 averageBytesPerChar = NativeConverter.getAveBytesPerChar(address);
    float maxBytesPerChar = NativeConverter.getMaxBytesPerChar(address);
    byte[] replacement = makeReplacement(icuCanonicalName, address);
    CharsetEncoderICU result = new CharsetEncoderICU(cs, averageBytesPerChar, maxBytesPerChar, replacement, address);
    address = 0; // CharsetEncoderICU has taken ownership; its finalizer will do the free.
    return result;
  } finally {
    if (address != 0) {
      NativeConverter.closeConverter(address);
    }
  }
}
origin: ibinti/bugvm

public static CharsetEncoderICU 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 averageBytesPerChar = NativeConverter.getAveBytesPerChar(address);
    float maxBytesPerChar = NativeConverter.getMaxBytesPerChar(address);
    byte[] replacement = makeReplacement(icuCanonicalName, address);
    CharsetEncoderICU result = new CharsetEncoderICU(cs, averageBytesPerChar, maxBytesPerChar, replacement, address);
    address = 0; // CharsetEncoderICU has taken ownership; its finalizer will do the free.
    return result;
  } finally {
    if (address != 0) {
      NativeConverter.closeConverter(address);
    }
  }
}
origin: com.mobidevelop.robovm/robovm-rt

public static CharsetEncoderICU 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 averageBytesPerChar = NativeConverter.getAveBytesPerChar(address);
    float maxBytesPerChar = NativeConverter.getMaxBytesPerChar(address);
    byte[] replacement = makeReplacement(icuCanonicalName, address);
    CharsetEncoderICU result = new CharsetEncoderICU(cs, averageBytesPerChar, maxBytesPerChar, replacement, address);
    address = 0; // CharsetEncoderICU has taken ownership; its finalizer will do the free.
    return result;
  } finally {
    if (address != 0) {
      NativeConverter.closeConverter(address);
    }
  }
}
origin: com.gluonhq/robovm-rt

public static CharsetEncoderICU 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 averageBytesPerChar = NativeConverter.getAveBytesPerChar(address);
    float maxBytesPerChar = NativeConverter.getMaxBytesPerChar(address);
    byte[] replacement = makeReplacement(icuCanonicalName, address);
    CharsetEncoderICU result = new CharsetEncoderICU(cs, averageBytesPerChar, maxBytesPerChar, replacement, address);
    address = 0; // CharsetEncoderICU has taken ownership; its finalizer will do the free.
    return result;
  } finally {
    if (address != 0) {
      NativeConverter.closeConverter(address);
    }
  }
}
origin: FlexoVM/flexovm

public static CharsetEncoderICU 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 averageBytesPerChar = NativeConverter.getAveBytesPerChar(address);
    float maxBytesPerChar = NativeConverter.getMaxBytesPerChar(address);
    byte[] replacement = makeReplacement(icuCanonicalName, address);
    CharsetEncoderICU result = new CharsetEncoderICU(cs, averageBytesPerChar, maxBytesPerChar, replacement, address);
    address = 0; // CharsetEncoderICU has taken ownership; its finalizer will do the free.
    return result;
  } finally {
    if (address != 0) {
      NativeConverter.closeConverter(address);
    }
  }
}
libcore.icuNativeConvertergetMaxBytesPerChar

Popular methods of NativeConverter

  • charsetForName
  • closeConverter
  • contains
  • decode
  • encode
  • getAvailableCharsetNames
  • getAveBytesPerChar
  • getAveCharsPerByte
  • getSubstitutionBytes
  • openConverter
  • resetByteToChar
  • resetCharToByte
  • resetByteToChar,
  • resetCharToByte,
  • setCallbackDecode,
  • setCallbackEncode,
  • translateCodingErrorAction

Popular in Java

  • Start an intent from android
  • scheduleAtFixedRate (Timer)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • getSystemService (Context)
  • VirtualMachine (com.sun.tools.attach)
    A Java virtual machine. A VirtualMachine represents a Java virtual machine to which this Java vir
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • SQLException (java.sql)
    An exception that indicates a failed JDBC operation. It provides the following information about pro
  • Dictionary (java.util)
    Note: Do not use this class since it is obsolete. Please use the Map interface for new implementatio
  • ResourceBundle (java.util)
    ResourceBundle is an abstract class which is the superclass of classes which provide Locale-specifi
  • JFrame (javax.swing)
  • 14 Best Plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now