本文整理了Java中java.nio.charset.CoderResult.<init>()
方法的一些代码示例,展示了CoderResult.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。CoderResult.<init>()
方法的具体详情如下:
包路径:java.nio.charset.CoderResult
类名称:CoderResult
方法名:<init>
[英]Constructs a CoderResult
object with its text description.
[中]用文本描述构造CoderResult
对象。
代码示例来源:origin: robovm/robovm
/**
* Gets a <code>CoderResult</code> object indicating a malformed-input
* error.
*
* @param length
* the length of the malformed-input.
* @return a <code>CoderResult</code> object indicating a malformed-input
* error.
* @throws IllegalArgumentException
* if <code>length</code> is non-positive.
*/
public static synchronized CoderResult malformedForLength(int length)
throws IllegalArgumentException {
if (length > 0) {
Integer key = Integer.valueOf(length);
synchronized (_malformedErrors) {
CoderResult r = _malformedErrors.get(key);
if (r == null) {
r = new CoderResult(TYPE_MALFORMED_INPUT, length);
_malformedErrors.put(key, r);
}
return r;
}
}
throw new IllegalArgumentException("length <= 0: " + length);
}
代码示例来源:origin: robovm/robovm
/**
* Gets a <code>CoderResult</code> object indicating an unmappable
* character error.
*
* @param length
* the length of the input unit sequence denoting the unmappable
* character.
* @return a <code>CoderResult</code> object indicating an unmappable
* character error.
* @throws IllegalArgumentException
* if <code>length</code> is non-positive.
*/
public static synchronized CoderResult unmappableForLength(int length)
throws IllegalArgumentException {
if (length > 0) {
Integer key = Integer.valueOf(length);
synchronized (_unmappableErrors) {
CoderResult r = _unmappableErrors.get(key);
if (r == null) {
r = new CoderResult(TYPE_UNMAPPABLE_CHAR, length);
_unmappableErrors.put(key, r);
}
return r;
}
}
throw new IllegalArgumentException("length <= 0: " + length);
}
代码示例来源:origin: com.jtransc/jtransc-rt
public static CoderResult unmappableForLength(int length) {
return new CoderResult(CR_UNMAPPABLE, length);
}
代码示例来源:origin: com.jtransc/jtransc-rt
public static CoderResult malformedForLength(int length) {
return new CoderResult(CR_MALFORMED, length);
}
代码示例来源:origin: MobiVM/robovm
/**
* Gets a <code>CoderResult</code> object indicating a malformed-input
* error.
*
* @param length
* the length of the malformed-input.
* @return a <code>CoderResult</code> object indicating a malformed-input
* error.
* @throws IllegalArgumentException
* if <code>length</code> is non-positive.
*/
public static synchronized CoderResult malformedForLength(int length)
throws IllegalArgumentException {
if (length > 0) {
Integer key = Integer.valueOf(length);
synchronized (_malformedErrors) {
CoderResult r = _malformedErrors.get(key);
if (r == null) {
r = new CoderResult(TYPE_MALFORMED_INPUT, length);
_malformedErrors.put(key, r);
}
return r;
}
}
throw new IllegalArgumentException("length <= 0: " + length);
}
代码示例来源:origin: ibinti/bugvm
/**
* Gets a <code>CoderResult</code> object indicating a malformed-input
* error.
*
* @param length
* the length of the malformed-input.
* @return a <code>CoderResult</code> object indicating a malformed-input
* error.
* @throws IllegalArgumentException
* if <code>length</code> is non-positive.
*/
public static synchronized CoderResult malformedForLength(int length)
throws IllegalArgumentException {
if (length > 0) {
Integer key = Integer.valueOf(length);
synchronized (_malformedErrors) {
CoderResult r = _malformedErrors.get(key);
if (r == null) {
r = new CoderResult(TYPE_MALFORMED_INPUT, length);
_malformedErrors.put(key, r);
}
return r;
}
}
throw new IllegalArgumentException("length <= 0: " + length);
}
代码示例来源:origin: com.gluonhq/robovm-rt
/**
* Gets a <code>CoderResult</code> object indicating a malformed-input
* error.
*
* @param length
* the length of the malformed-input.
* @return a <code>CoderResult</code> object indicating a malformed-input
* error.
* @throws IllegalArgumentException
* if <code>length</code> is non-positive.
*/
public static synchronized CoderResult malformedForLength(int length)
throws IllegalArgumentException {
if (length > 0) {
Integer key = Integer.valueOf(length);
synchronized (_malformedErrors) {
CoderResult r = _malformedErrors.get(key);
if (r == null) {
r = new CoderResult(TYPE_MALFORMED_INPUT, length);
_malformedErrors.put(key, r);
}
return r;
}
}
throw new IllegalArgumentException("length <= 0: " + length);
}
代码示例来源:origin: com.mobidevelop.robovm/robovm-rt
/**
* Gets a <code>CoderResult</code> object indicating an unmappable
* character error.
*
* @param length
* the length of the input unit sequence denoting the unmappable
* character.
* @return a <code>CoderResult</code> object indicating an unmappable
* character error.
* @throws IllegalArgumentException
* if <code>length</code> is non-positive.
*/
public static synchronized CoderResult unmappableForLength(int length)
throws IllegalArgumentException {
if (length > 0) {
Integer key = Integer.valueOf(length);
synchronized (_unmappableErrors) {
CoderResult r = _unmappableErrors.get(key);
if (r == null) {
r = new CoderResult(TYPE_UNMAPPABLE_CHAR, length);
_unmappableErrors.put(key, r);
}
return r;
}
}
throw new IllegalArgumentException("length <= 0: " + length);
}
代码示例来源:origin: ibinti/bugvm
/**
* Gets a <code>CoderResult</code> object indicating an unmappable
* character error.
*
* @param length
* the length of the input unit sequence denoting the unmappable
* character.
* @return a <code>CoderResult</code> object indicating an unmappable
* character error.
* @throws IllegalArgumentException
* if <code>length</code> is non-positive.
*/
public static synchronized CoderResult unmappableForLength(int length)
throws IllegalArgumentException {
if (length > 0) {
Integer key = Integer.valueOf(length);
synchronized (_unmappableErrors) {
CoderResult r = _unmappableErrors.get(key);
if (r == null) {
r = new CoderResult(TYPE_UNMAPPABLE_CHAR, length);
_unmappableErrors.put(key, r);
}
return r;
}
}
throw new IllegalArgumentException("length <= 0: " + length);
}
代码示例来源:origin: com.bugvm/bugvm-rt
/**
* Gets a <code>CoderResult</code> object indicating a malformed-input
* error.
*
* @param length
* the length of the malformed-input.
* @return a <code>CoderResult</code> object indicating a malformed-input
* error.
* @throws IllegalArgumentException
* if <code>length</code> is non-positive.
*/
public static synchronized CoderResult malformedForLength(int length)
throws IllegalArgumentException {
if (length > 0) {
Integer key = Integer.valueOf(length);
synchronized (_malformedErrors) {
CoderResult r = _malformedErrors.get(key);
if (r == null) {
r = new CoderResult(TYPE_MALFORMED_INPUT, length);
_malformedErrors.put(key, r);
}
return r;
}
}
throw new IllegalArgumentException("length <= 0: " + length);
}
代码示例来源:origin: MobiVM/robovm
/**
* Gets a <code>CoderResult</code> object indicating an unmappable
* character error.
*
* @param length
* the length of the input unit sequence denoting the unmappable
* character.
* @return a <code>CoderResult</code> object indicating an unmappable
* character error.
* @throws IllegalArgumentException
* if <code>length</code> is non-positive.
*/
public static synchronized CoderResult unmappableForLength(int length)
throws IllegalArgumentException {
if (length > 0) {
Integer key = Integer.valueOf(length);
synchronized (_unmappableErrors) {
CoderResult r = _unmappableErrors.get(key);
if (r == null) {
r = new CoderResult(TYPE_UNMAPPABLE_CHAR, length);
_unmappableErrors.put(key, r);
}
return r;
}
}
throw new IllegalArgumentException("length <= 0: " + length);
}
代码示例来源:origin: com.bugvm/bugvm-rt
/**
* Gets a <code>CoderResult</code> object indicating an unmappable
* character error.
*
* @param length
* the length of the input unit sequence denoting the unmappable
* character.
* @return a <code>CoderResult</code> object indicating an unmappable
* character error.
* @throws IllegalArgumentException
* if <code>length</code> is non-positive.
*/
public static synchronized CoderResult unmappableForLength(int length)
throws IllegalArgumentException {
if (length > 0) {
Integer key = Integer.valueOf(length);
synchronized (_unmappableErrors) {
CoderResult r = _unmappableErrors.get(key);
if (r == null) {
r = new CoderResult(TYPE_UNMAPPABLE_CHAR, length);
_unmappableErrors.put(key, r);
}
return r;
}
}
throw new IllegalArgumentException("length <= 0: " + length);
}
代码示例来源:origin: com.mobidevelop.robovm/robovm-rt
/**
* Gets a <code>CoderResult</code> object indicating a malformed-input
* error.
*
* @param length
* the length of the malformed-input.
* @return a <code>CoderResult</code> object indicating a malformed-input
* error.
* @throws IllegalArgumentException
* if <code>length</code> is non-positive.
*/
public static synchronized CoderResult malformedForLength(int length)
throws IllegalArgumentException {
if (length > 0) {
Integer key = Integer.valueOf(length);
synchronized (_malformedErrors) {
CoderResult r = _malformedErrors.get(key);
if (r == null) {
r = new CoderResult(TYPE_MALFORMED_INPUT, length);
_malformedErrors.put(key, r);
}
return r;
}
}
throw new IllegalArgumentException("length <= 0: " + length);
}
代码示例来源:origin: FlexoVM/flexovm
/**
* Gets a <code>CoderResult</code> object indicating a malformed-input
* error.
*
* @param length
* the length of the malformed-input.
* @return a <code>CoderResult</code> object indicating a malformed-input
* error.
* @throws IllegalArgumentException
* if <code>length</code> is non-positive.
*/
public static synchronized CoderResult malformedForLength(int length)
throws IllegalArgumentException {
if (length > 0) {
Integer key = Integer.valueOf(length);
synchronized (_malformedErrors) {
CoderResult r = _malformedErrors.get(key);
if (r == null) {
r = new CoderResult(TYPE_MALFORMED_INPUT, length);
_malformedErrors.put(key, r);
}
return r;
}
}
throw new IllegalArgumentException("length <= 0: " + length);
}
代码示例来源:origin: com.gluonhq/robovm-rt
/**
* Gets a <code>CoderResult</code> object indicating an unmappable
* character error.
*
* @param length
* the length of the input unit sequence denoting the unmappable
* character.
* @return a <code>CoderResult</code> object indicating an unmappable
* character error.
* @throws IllegalArgumentException
* if <code>length</code> is non-positive.
*/
public static synchronized CoderResult unmappableForLength(int length)
throws IllegalArgumentException {
if (length > 0) {
Integer key = Integer.valueOf(length);
synchronized (_unmappableErrors) {
CoderResult r = _unmappableErrors.get(key);
if (r == null) {
r = new CoderResult(TYPE_UNMAPPABLE_CHAR, length);
_unmappableErrors.put(key, r);
}
return r;
}
}
throw new IllegalArgumentException("length <= 0: " + length);
}
代码示例来源:origin: FlexoVM/flexovm
/**
* Gets a <code>CoderResult</code> object indicating an unmappable
* character error.
*
* @param length
* the length of the input unit sequence denoting the unmappable
* character.
* @return a <code>CoderResult</code> object indicating an unmappable
* character error.
* @throws IllegalArgumentException
* if <code>length</code> is non-positive.
*/
public static synchronized CoderResult unmappableForLength(int length)
throws IllegalArgumentException {
if (length > 0) {
Integer key = Integer.valueOf(length);
synchronized (_unmappableErrors) {
CoderResult r = _unmappableErrors.get(key);
if (r == null) {
r = new CoderResult(TYPE_UNMAPPABLE_CHAR, length);
_unmappableErrors.put(key, r);
}
return r;
}
}
throw new IllegalArgumentException("length <= 0: " + length);
}
内容来源于网络,如有侵权,请联系作者删除!