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

  • Updating database using SQL prepared statement
  • startActivity (Activity)
  • setContentView (Activity)
  • notifyDataSetChanged (ArrayAdapter)
  • Rectangle (java.awt)
    A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-
  • FileOutputStream (java.io)
    An output stream that writes bytes to a file. If the output file exists, it can be replaced or appen
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • Format (java.text)
    The base class for all formats. This is an abstract base class which specifies the protocol for clas
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
  • Top plugins for WebStorm
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