/** * 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); }
/** * 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); }
public static CoderResult unmappableForLength(int length) { return new CoderResult(CR_UNMAPPABLE, length); }
public static CoderResult malformedForLength(int length) { return new CoderResult(CR_MALFORMED, length); }
/** * 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); }
/** * 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); }
/** * 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); }
/** * 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); }
/** * 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); }
/** * 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); }
/** * 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); }
/** * 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); }
/** * 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); }
/** * 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); }
/** * 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); }
/** * 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); }