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

How to use
getAveBytesPerChar
method
in
libcore.icu.NativeConverter

Best Java code snippets using libcore.icu.NativeConverter.getAveBytesPerChar (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.icuNativeConvertergetAveBytesPerChar

Popular methods of NativeConverter

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

Popular in Java

  • Parsing JSON documents to java classes using gson
  • getSharedPreferences (Context)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • getApplicationContext (Context)
  • File (java.io)
    An "abstract" representation of a file system entity identified by a pathname. The pathname may be a
  • SQLException (java.sql)
    An exception that indicates a failed JDBC operation. It provides the following information about pro
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • Comparator (java.util)
    A Comparator is used to compare two objects to determine their ordering with respect to each other.
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement. A servlet is a small Java program that runs within
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
  • From CI to AI: The AI layer in your organization
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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