Home
last modified time | relevance | path

Searched refs:CodingErrorAction (Results 1 – 24 of 24) sorted by relevance

/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/nio/charset/
DCodingErrorActionTest.java19 import java.nio.charset.CodingErrorAction;
46 assertNotNull(CodingErrorAction.IGNORE); in testIGNORE()
47 assertNotNull(CodingErrorAction.REPLACE); in testIGNORE()
48 assertNotNull(CodingErrorAction.REPORT); in testIGNORE()
49 assertNotSame(CodingErrorAction.IGNORE, CodingErrorAction.REPLACE); in testIGNORE()
50 assertNotSame(CodingErrorAction.IGNORE, CodingErrorAction.REPORT); in testIGNORE()
51 assertNotSame(CodingErrorAction.REPLACE, CodingErrorAction.REPORT); in testIGNORE()
58 assertTrue(CodingErrorAction.IGNORE.toString().indexOf("IGNORE") != -1); in testToString()
59 assertTrue(CodingErrorAction.REPLACE.toString().indexOf("REPLACE") != -1); in testToString()
60 assertTrue(CodingErrorAction.REPORT.toString().indexOf("REPORT") != -1); in testToString()
DCharsetDecoder2Test.java29 import java.nio.charset.CodingErrorAction;
92 decoder2.onMalformedInput(CodingErrorAction.REPORT); in test_decode()
93 decoder2.onUnmappableCharacter(CodingErrorAction.REPORT); in test_decode()
110 cs1.newDecoder().onMalformedInput(CodingErrorAction.REPLACE) in test_decodeLjava_nio_ByteBuffer()
111 .onUnmappableCharacter(CodingErrorAction.REPLACE).decode( in test_decodeLjava_nio_ByteBuffer()
186 decoder.onMalformedInput(CodingErrorAction.REPLACE); in testDecodeLjava_nio_ByteBuffer_ReplaceOverflow()
251 decoder.onMalformedInput(CodingErrorAction.REPORT); in testInvalidDecoding()
252 decoder.onUnmappableCharacter(CodingErrorAction.REPORT); in testInvalidDecoding()
DCharsetDecoderTest.java25 import java.nio.charset.CodingErrorAction;
82 assertSame(CodingErrorAction.REPORT, decoder.malformedInputAction()); in testDefaultValues()
83 assertSame(CodingErrorAction.REPORT, decoder in testDefaultValues()
148 assertSame(CodingErrorAction.REPORT, decoder.malformedInputAction()); in testOnMalformedInput()
154 decoder.onMalformedInput(CodingErrorAction.IGNORE); in testOnMalformedInput()
155 assertSame(CodingErrorAction.IGNORE, decoder.malformedInputAction()); in testOnMalformedInput()
162 assertSame(CodingErrorAction.REPORT, decoder in testOnUnmappableCharacter()
169 decoder.onUnmappableCharacter(CodingErrorAction.IGNORE); in testOnUnmappableCharacter()
170 assertSame(CodingErrorAction.IGNORE, decoder in testOnUnmappableCharacter()
241 decoder.onMalformedInput(CodingErrorAction.REPORT); in testDecodeByteBufferException()
[all …]
DCharsetEncoderTest.java25 import java.nio.charset.CodingErrorAction;
90 assertEquals(CodingErrorAction.REPORT, encoder.malformedInputAction()); in testDefaultValue()
91 assertEquals(CodingErrorAction.REPORT, encoder.unmappableCharacterAction()); in testDefaultValue()
92 assertSame(encoder, encoder.onMalformedInput(CodingErrorAction.IGNORE)); in testDefaultValue()
93 assertSame(encoder, encoder.onUnmappableCharacter(CodingErrorAction.IGNORE)); in testDefaultValue()
111 assertEquals(CodingErrorAction.REPORT, encoder.malformedInputAction()); in testCharsetEncoderCharsetfloatfloat()
112 assertEquals(CodingErrorAction.REPORT, encoder in testCharsetEncoderCharsetfloatfloat()
116 assertSame(encoder, encoder.onMalformedInput(CodingErrorAction.IGNORE)); in testCharsetEncoderCharsetfloatfloat()
118 .onUnmappableCharacter(CodingErrorAction.IGNORE)); in testCharsetEncoderCharsetfloatfloat()
588 encoder.onMalformedInput(CodingErrorAction.REPLACE); in testEncodeCharBuffer()
[all …]
DISOCharsetEncoderTest.java23 import java.nio.charset.CodingErrorAction;
84 encoder.onMalformedInput(CodingErrorAction.REPORT); in testMultiStepEncode()
85 encoder.onUnmappableCharacter(CodingErrorAction.REPORT); in testMultiStepEncode()
DUTF16CharsetDecoderTest.java25 import java.nio.charset.CodingErrorAction;
DASCIICharsetEncoderTest.java26 import java.nio.charset.CodingErrorAction;
77 encoder.onMalformedInput(CodingErrorAction.REPORT); in testMultiStepEncode()
78 encoder.onUnmappableCharacter(CodingErrorAction.REPORT); in testMultiStepEncode()
/libcore/luni/src/main/java/java/nio/charset/
DCodingErrorAction.java24 public class CodingErrorAction { class
29 public static final CodingErrorAction IGNORE = new CodingErrorAction(
36 public static final CodingErrorAction REPLACE = new CodingErrorAction(
44 public static final CodingErrorAction REPORT = new CodingErrorAction(
53 private CodingErrorAction(String action) { in CodingErrorAction() method in CodingErrorAction
DCharsetEncoder.java93 private CodingErrorAction malformedInputAction = CodingErrorAction.REPORT;
94 private CodingErrorAction unmappableCharacterAction = CodingErrorAction.REPORT;
197 CodingErrorAction originalMalformedInputAction = malformedInputAction; in canEncode()
198 CodingErrorAction originalUnmappableCharacterAction = unmappableCharacterAction; in canEncode()
199 onMalformedInput(CodingErrorAction.REPORT); in canEncode()
200 onUnmappableCharacter(CodingErrorAction.REPORT); in canEncode()
279 if (malformedInputAction == CodingErrorAction.REPORT && result.isMalformed()) { in checkCoderResult()
281 } else if (unmappableCharacterAction == CodingErrorAction.REPORT && result.isUnmappable()) { in checkCoderResult()
386 CodingErrorAction action = in encode()
388 if (action == CodingErrorAction.REPORT) { in encode()
[all …]
DCharsetDecoder.java99 private CodingErrorAction malformedInputAction = CodingErrorAction.REPORT;
100 private CodingErrorAction unmappableCharacterAction = CodingErrorAction.REPORT;
210 if (result.isMalformed() && malformedInputAction == CodingErrorAction.REPORT) { in checkCoderResult()
212 } else if (result.isUnmappable() && unmappableCharacterAction == CodingErrorAction.REPORT) { in checkCoderResult()
324 CodingErrorAction action = in decode()
326 if (action == CodingErrorAction.REPORT) { in decode()
328 } else if (action == CodingErrorAction.REPLACE) { in decode()
458 protected void implOnMalformedInput(CodingErrorAction newAction) { in implOnMalformedInput()
470 protected void implOnUnmappableCharacter(CodingErrorAction newAction) { in implOnUnmappableCharacter()
535 public CodingErrorAction malformedInputAction() { in malformedInputAction()
[all …]
DCharset.java443 .onMalformedInput(CodingErrorAction.REPLACE) in encode()
444 .onUnmappableCharacter(CodingErrorAction.REPLACE).encode( in encode()
479 .onMalformedInput(CodingErrorAction.REPLACE) in decode()
480 .onUnmappableCharacter(CodingErrorAction.REPLACE).decode(buffer); in decode()
DCharsetDecoderICU.java77 @Override protected final void implOnMalformedInput(CodingErrorAction newAction) { in implOnMalformedInput()
81 @Override protected final void implOnUnmappableCharacter(CodingErrorAction newAction) { in implOnUnmappableCharacter()
DCharsetEncoderICU.java105 @Override protected void implOnMalformedInput(CodingErrorAction newAction) { in implOnMalformedInput()
109 @Override protected void implOnUnmappableCharacter(CodingErrorAction newAction) { in implOnUnmappableCharacter()
/libcore/luni/src/main/java/libcore/icu/
DNativeConverter.java15 import java.nio.charset.CodingErrorAction;
43 private static int translateCodingErrorAction(CodingErrorAction action) { in translateCodingErrorAction()
44 if (action == CodingErrorAction.REPORT) { in translateCodingErrorAction()
46 } else if (action == CodingErrorAction.IGNORE) { in translateCodingErrorAction()
48 } else if (action == CodingErrorAction.REPLACE) { in translateCodingErrorAction()
/libcore/luni/src/test/java/libcore/java/nio/charset/
DOldCharset_MultiByte_EUC_JP.java21 import java.nio.charset.CodingErrorAction;
35 encoder.onUnmappableCharacter(CodingErrorAction.REPORT); in test_CodecDynamic()
36 decoder.onMalformedInput(CodingErrorAction.REPORT); in test_CodecDynamic()
DOldCharset_SingleByteAbstractTest.java21 import java.nio.charset.CodingErrorAction;
51 decoder.onMalformedInput(CodingErrorAction.REPLACE); in dumpDecoded()
67 decoder.onMalformedInput(CodingErrorAction.REPLACE); in decodeReplace()
68 decoder.onUnmappableCharacter(CodingErrorAction.REPLACE); in decodeReplace()
107 encoder.onUnmappableCharacter(CodingErrorAction.REPLACE); in test_Encode()
DCharsetEncoderTest.java24 import java.nio.charset.CodingErrorAction;
32 e.onMalformedInput(CodingErrorAction.REPLACE); in test_replaceWith()
33 e.onUnmappableCharacter(CodingErrorAction.REPLACE); in test_replaceWith()
90 testCharsetEncoderSplitSurrogates(CodingErrorAction.IGNORE); in testCharsetEncoderSplitSurrogates_IGNORE()
94 testCharsetEncoderSplitSurrogates(CodingErrorAction.REPORT); in testCharsetEncoderSplitSurrogates_REPORT()
98 testCharsetEncoderSplitSurrogates(CodingErrorAction.REPLACE); in testCharsetEncoderSplitSurrogates_REPLACE()
101 private void testCharsetEncoderSplitSurrogates(CodingErrorAction cea) throws Exception { in testCharsetEncoderSplitSurrogates()
DOldCharset_AbstractTest.java25 import java.nio.charset.CodingErrorAction;
111 encoder.onUnmappableCharacter(CodingErrorAction.REPORT); in test_dumpEncoded()
125 decoder.onMalformedInput(CodingErrorAction.REPORT); in decode()
138 encoder.onUnmappableCharacter(CodingErrorAction.REPORT); in test_Encode()
148 encoder.onUnmappableCharacter(CodingErrorAction.REPORT); in NNtest_CodecDynamicIndividuals()
149 decoder.onMalformedInput(CodingErrorAction.REPORT); in NNtest_CodecDynamicIndividuals()
177 encoder.onUnmappableCharacter(CodingErrorAction.REPORT); in test_CodecDynamic()
178 decoder.onMalformedInput(CodingErrorAction.REPORT); in test_CodecDynamic()
DCharsetDecoderTest.java26 import java.nio.charset.CodingErrorAction;
33 d.onMalformedInput(CodingErrorAction.REPLACE); in test_replaceWith()
34 d.onUnmappableCharacter(CodingErrorAction.REPLACE); in test_replaceWith()
DCharset_TestGenerator.java24 import java.nio.charset.CodingErrorAction;
221 encoder.onUnmappableCharacter(CodingErrorAction.REPLACE); in genEncoded()
/libcore/luni/src/main/java/java/io/
DInputStreamReader.java25 import java.nio.charset.CodingErrorAction;
84 CodingErrorAction.REPLACE).onUnmappableCharacter( in InputStreamReader()
85 CodingErrorAction.REPLACE); in InputStreamReader()
123 CodingErrorAction.REPLACE).onUnmappableCharacter( in InputStreamReader()
124 CodingErrorAction.REPLACE); in InputStreamReader()
DOutputStreamWriter.java25 import java.nio.charset.CodingErrorAction;
85 encoder.onMalformedInput(CodingErrorAction.REPLACE); in OutputStreamWriter()
86 encoder.onUnmappableCharacter(CodingErrorAction.REPLACE); in OutputStreamWriter()
103 encoder.onMalformedInput(CodingErrorAction.REPLACE); in OutputStreamWriter()
104 encoder.onUnmappableCharacter(CodingErrorAction.REPLACE); in OutputStreamWriter()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/io/
DInputStreamReaderTest.java31 import java.nio.charset.CodingErrorAction;
382 decoder.onMalformedInput(CodingErrorAction.REPORT); in test_read_1()
393 decoder2.onMalformedInput(CodingErrorAction.IGNORE); in test_read_1()
399 decoder3.onMalformedInput(CodingErrorAction.REPLACE); in test_read_1()
/libcore/luni/src/test/java/libcore/java/lang/
DStringTest.java28 import java.nio.charset.CodingErrorAction;
348 decoder.onMalformedInput(CodingErrorAction.REPLACE); in test_23831()