Home
last modified time | relevance | path

Searched refs:parse (Results 1 – 25 of 194) sorted by relevance

12345678

/libcore/luni/src/main/java/javax/xml/parsers/
DSAXParser.java124 public void parse(InputStream is, HandlerBase hb) in parse() method in SAXParser
131 this.parse(input, hb); in parse()
152 public void parse( in parse() method in SAXParser
163 this.parse(input, hb); in parse()
180 public void parse(InputStream is, DefaultHandler dh) in parse() method in SAXParser
187 this.parse(input, dh); in parse()
205 public void parse( in parse() method in SAXParser
216 this.parse(input, dh); in parse()
235 public void parse(String uri, HandlerBase hb) in parse() method in SAXParser
242 this.parse(input, hb); in parse()
[all …]
DDocumentBuilder.java100 public Document parse(InputStream is) in parse() method in DocumentBuilder
107 return parse(in); in parse()
124 public Document parse(InputStream is, String systemId) in parse() method in DocumentBuilder
132 return parse(in); in parse()
148 public Document parse(String uri) in parse() method in DocumentBuilder
155 return parse(in); in parse()
171 public Document parse(File f) throws SAXException, IOException { in parse() method in DocumentBuilder
183 return parse(in); in parse()
199 public abstract Document parse(InputSource is) in parse() method in DocumentBuilder
/libcore/ojluni/src/test/java/time/test/java/time/format/
DTestZoneOffsetParser.java232 …public void test_parse_exactMatch(String pattern, String parse, ZoneOffset expected) throws Except… in test_parse_exactMatch() argument
234 TemporalAccessor parsed = getFormatter(pattern, "Z").parseUnresolved(parse, pos); in test_parse_exactMatch()
235 assertEquals(pos.getIndex(), parse.length()); in test_parse_exactMatch()
240 …public void test_parse_startStringMatch(String pattern, String parse, ZoneOffset expected) throws … in test_parse_startStringMatch() argument
242 TemporalAccessor parsed = getFormatter(pattern, "Z").parseUnresolved(parse + ":OTHER", pos); in test_parse_startStringMatch()
243 assertEquals(pos.getIndex(), parse.length()); in test_parse_startStringMatch()
248 …public void test_parse_midStringMatch(String pattern, String parse, ZoneOffset expected) throws Ex… in test_parse_midStringMatch() argument
250 …TemporalAccessor parsed = getFormatter(pattern, "Z").parseUnresolved("OTHER" + parse + ":OTHER", p… in test_parse_midStringMatch()
251 assertEquals(pos.getIndex(), parse.length() + 5); in test_parse_midStringMatch()
256 …public void test_parse_endStringMatch(String pattern, String parse, ZoneOffset expected) throws Ex… in test_parse_endStringMatch() argument
[all …]
DTestDateTimeParsing.java138 TemporalAccessor actual = formatter.parse(text); in test_parse_instantZones_ZDT()
144 TemporalAccessor actual = formatter.parse(text); in test_parse_instantZones_LDT()
150 TemporalAccessor actual = formatter.parse(text); in test_parse_instantZones_Instant()
156 TemporalAccessor actual = formatter.parse(text); in test_parse_instantZones_supported()
177 TemporalAccessor actual = formatter.parse(text); in test_parse_instantNoZone_ZDT()
183 TemporalAccessor actual = formatter.parse(text); in test_parse_instantNoZone_LDT()
189 TemporalAccessor actual = formatter.parse(text); in test_parse_instantNoZone_Instant()
195 TemporalAccessor actual = formatter.parse(text); in test_parse_instantNoZone_supported()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/net/
DHttpCookieTest.java394 HttpCookie cookie1 = HttpCookie.parse("Set-Cookie:name=value;max-age=2;").get(0); in test_HasExpiredBug25682357()
395 HttpCookie cookie2 = HttpCookie.parse("Set-Cookie:name=value;max-age=100;").get(0); in test_HasExpiredBug25682357()
422 HttpCookie pastExpiryCookie = HttpCookie.parse(pastExpiryCookieHeader).get(0); in test_HasExpiredBug25682357_2()
428 HttpCookie futureExpiryCookie = HttpCookie.parse(futureExpiryCookieHeader).get(0); in test_HasExpiredBug25682357_2()
548 HttpCookie.parse(null); in test_Parse_exception()
612 .parse("Set-Cookie:name=test;expires=Thu, 30-Oct-2008 19:14:07 GMT;"); in test_Parse_locale()
618 .parse("Set-Cookie:name=test;expires=Sun, 30-Oct-2005 19:14:07 GMT;"); in test_Parse_locale()
624 .parse("Set-Cookie:name=test;max-age=1234;expires=Sun, 30-Oct-2005 19:14:07 GMT;"); in test_Parse_locale()
632 .parse("Set-Cookie:name=test;max-age=-12345;"); in test_Parse_locale()
639 list = HttpCookie.parse("Set-Cookie2:name=test;max-age=1000"); in test_Parse_locale()
[all …]
/libcore/luni/src/test/java/libcore/java/text/
DOldDecimalFormatTestICU.java69 assertEquals(123, format.parse("xxxxxxxxx123.0").intValue()); in test_paddingPattern()
78 assertEquals(2, format.parse("\u00e72 o'clock").intValue()); in test_paddingPattern()
79 assertEquals(12, format.parse("12 o'clock").intValue()); in test_paddingPattern()
103 assertEquals(100, format.parse("1E+2").intValue()); in test_positiveExponentSign()
104 assertEquals(0.01f, format.parse("1E-2").floatValue()); in test_positiveExponentSign()
108 assertEquals(100, format.parse("1E2 m/s").intValue()); in test_positiveExponentSign()
112 assertEquals(0.00123f, format.parse("12.3E-4").floatValue()); in test_positiveExponentSign()
116 assertEquals(12345, format.parse("12.345E3").intValue()); in test_positiveExponentSign()
131 assertEquals(1234567890, format.parse("123,456,7890").intValue()); in test_secondaryGroupingSize()
134 assertEquals(1234567890, format.parse("123,456,7890").intValue()); in test_secondaryGroupingSize()
[all …]
DOldDateFormatTest.java40 public Date parse(String source, ParsePosition pos) { in parse() method in OldDateFormatTest.MockDateFormat
216 format.parse("not a Date"); in test_parseLString()
225 Date date = format.parse(format.format(current).toString()); in test_parseLString()
238 format.parse("27/08/1998"); in test_parseLString()
244 format.parse("30/30/908 4:50, PDT"); in test_parseLString()
250 format.parse("837039928046"); in test_parseLString()
258 Date date = format.parse(format.format(current).toString()); in test_parseLString()
271 format.parse("Jan 16 1970"); in test_parseLString()
278 format.parse("27/08/1998"); in test_parseLString()
286 Date date = format.parse(format.format(current).toString()); in test_parseLString()
[all …]
DSimpleDateFormatTest.java240 Date d = sdf.parse(value, pp); in assertCannotParse()
257 Date d = sdf.parse(value, pp); in parseDate()
333 sdf.parse("2010-12-03 00:00:00 -0800"); in testTimeZoneFormatting()
346 Date date = sdf.parse("2010-07-08 02:44:48"); in testTimeZoneFormatting()
362 calendar.setTime(format.parse("2011-06-21T10:00 Pacific Standard Time")); // 18:00 GMT-8 in testDstZoneNameWithNonDstTimestamp()
370 calendar.setTime(format.parse("2010-12-21T10:00 Pacific Daylight Time")); // 17:00 GMT-7 in testNonDstZoneNameWithDstTimestamp()
379 calendar.setTime(format.parse("2011-06-21T20:00 Lord Howe Daylight Time")); // 9:00 GMT+11 in testDstZoneWithNonDstTimestampForNonHourDstZone()
387 calendar.setTime(format.parse("2010-12-21T19:30 Lord Howe Standard Time")); //9:00 GMT+10:30 in testNonDstZoneWithDstTimestampForNonHourDstZone()
393 new SimpleDateFormat("z", Locale.FRANCE).parse("UTC"); in testParseTimezoneOnly()
394 new SimpleDateFormat("z", Locale.US).parse("UTC"); in testParseTimezoneOnly()
[all …]
/libcore/luni/src/test/java/libcore/java/util/
DLocaleLanguageRangeTest.java239 assertEquals(expected, LanguageRange.parse(ranges, map)); in testMapEquivalents()
241 assertEquals(expected, LanguageRange.mapEquivalents(LanguageRange.parse(ranges), map)); in testMapEquivalents()
263 assertEquals(expectedOutput, LanguageRange.parse(ranges, map)); in testParse_map_localeEquivalent()
266 LanguageRange.mapEquivalents(LanguageRange.parse(ranges), map)); in testParse_map_localeEquivalent()
279 assertEquals(expected, LanguageRange.parse("Accept-Language: iw,en-us;q=0.7,en;q=0.3")); in testParse_acceptLanguage_exampleFromDocumentation()
291 assertEquals(expected, LanguageRange.parse("Accept-Language: da, en-gb;q=0.8, en;q=0.7")); in testParse_acceptLanguage_exampleFromRfc2616()
296 LanguageRange.parse("Accept-Language: fr,en-us;q=1;q=0.5"); in testParse_acceptLanguage_malformed()
301 LanguageRange.parse("Accept-Language: q=0.5"); in testParse_acceptLanguage_malformed()
306 LanguageRange.parse("Accept-Language: ;q=0.5"); in testParse_acceptLanguage_malformed()
311 LanguageRange.parse("Accept-Language: thislanguagetagistoolong;q=0.5"); in testParse_acceptLanguage_malformed()
[all …]
DDateTest.java85 Date.parse("Wed, 06 Jan 2016 11:55:59 GMT+05:00"), in test_parse_timezones()
86 Date.parse("Wed, 06 Jan 2016 11:55:59 GMT+0500")); in test_parse_timezones()
89 Date.parse("Wed, 06 Jan 2016 11:55:59 GMT+05:00"), in test_parse_timezones()
90 Date.parse("Wed, 06 Jan 2016 11:55:59 GMT+05")); in test_parse_timezones()
171 check_convertToInstantAndBack(Date.parse("Wed, 06 Jan 2016 11:55:59 GMT+0500")); in test_convertToInstantAndBack()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/javax/xml/parsers/
DSAXParserTest.java315 parser.parse(list_wf[i], dh); in test_parseLjava_io_FileLorg_xml_sax_helpers_DefaultHandler()
322 parser.parse(list_nwf[i], dh); in test_parseLjava_io_FileLorg_xml_sax_helpers_DefaultHandler()
331 parser.parse((File) null, dh); in test_parseLjava_io_FileLorg_xml_sax_helpers_DefaultHandler()
338 parser.parse(list_wf[0], (DefaultHandler) null); in test_parseLjava_io_FileLorg_xml_sax_helpers_DefaultHandler()
350 parser.parse(list_wf[i], dh); in testParseFileHandlerBase()
363 parser.parse(list_nwf[i], dh); in testParseFileHandlerBase()
376 parser.parse((File) null, dh); in testParseFileHandlerBase()
387 parser.parse(list_wf[0], (HandlerBase) null); in testParseFileHandlerBase()
406 parser.parse(is, dh); in test_parseLorg_xml_sax_InputSourceLorg_xml_sax_helpers_DefaultHandler()
414 parser.parse(is, dh); in test_parseLorg_xml_sax_InputSourceLorg_xml_sax_helpers_DefaultHandler()
[all …]
DDocumentBuilderTest.java95 public Document parse(InputSource is) throws SAXException, IOException { in parse() method in DocumentBuilderTest.MockDocumentBuilder
229 Document d = db.parse(f); in testGetBaseURI()
245 Document d = db.parse(f); in test_parseLjava_io_File()
262 db.parse((File)null); in test_parseLjava_io_File()
274 db.parse(new File("_")); in test_parseLjava_io_File()
285 db.parse(f); in test_parseLjava_io_File()
305 Document d = db.parse(is); in test_parseLjava_io_InputStream()
322 db.parse((InputStream)null); in test_parseLjava_io_InputStream()
334 db.parse(new FileInputStream("_")); in test_parseLjava_io_InputStream()
345 db.parse(is); in test_parseLjava_io_InputStream()
[all …]
/libcore/ojluni/src/test/java/time/tck/java/time/format/
DTCKInstantPrinterParser.java228 assertEquals(f.parse(input, Instant::from), expected); in test_parse_digitsMinusOne()
229 assertEquals(f.parse(input).query(DateTimeFormatter.parsedExcessDays()), Period.ZERO); in test_parse_digitsMinusOne()
230 assertEquals(f.parse(input).query(DateTimeFormatter.parsedLeapSecond()), Boolean.FALSE); in test_parse_digitsMinusOne()
238 assertEquals(f.parse(input, Instant::from), expected); in test_parse_digitsNine()
239 assertEquals(f.parse(input).query(DateTimeFormatter.parsedExcessDays()), Period.ZERO); in test_parse_digitsNine()
240 assertEquals(f.parse(input).query(DateTimeFormatter.parsedLeapSecond()), Boolean.FALSE); in test_parse_digitsNine()
243 f.parse(input, Instant::from); in test_parse_digitsNine()
256 TemporalAccessor parsed = f.withResolverStyle(style).parse("1970-02-03T24:00:00Z"); in test_parse_endOfDay()
268 … TemporalAccessor parsed = f.withResolverStyle(style).parse("1970-02-03T23:59:60.123456789Z"); in test_parse_leapSecond()
DTCKDateTimeParseResolver.java156 TemporalAccessor accessor = f.parse(str); in test_resolveOneNoChange()
194 TemporalAccessor accessor = f.parse(str); in test_resolveTwoNoChange()
226 TemporalAccessor accessor = f.parse(str); in test_resolveThreeNoChange()
261 TemporalAccessor accessor = f.parse(str); in test_resolveOneToField()
287 TemporalAccessor accessor = f.parse(str); in test_resolveOneToDate()
312 TemporalAccessor accessor = f.parse(str); in test_resolveOneToTime()
343 TemporalAccessor accessor = f.parse(str); in test_resolveTwoToField()
391 TemporalAccessor accessor = f.parse(str); in test_resolveTwoToDate()
478 TemporalAccessor accessor = f.parse(str); in test_resolveTwoToTime()
511 TemporalAccessor accessor = f.parse(str); in test_resolveThreeToDate()
[all …]
DTCKDateTimeFormatter.java180 base.parse("2012-6-30-321", LocalDate::from); // wrong day-of-year in test_resolverFields_selectOneDateResolveYMD()
185 LocalDate parsed = f.parse("2012-6-30-321", LocalDate::from); // ignored day-of-year in test_resolverFields_selectOneDateResolveYMD()
199 base.parse("2012-6-30-321", LocalDate::from); // wrong month/day-of-month in test_resolverFields_selectOneDateResolveYD()
204 LocalDate parsed = f.parse("2012-6-30-321", LocalDate::from); // ignored month/day-of-month in test_resolverFields_selectOneDateResolveYD()
215 base.parse("2012-321-1", LocalDate::from); // wrong day-of-week in test_resolverFields_ignoreCrossCheck()
220 LocalDate parsed = f.parse("2012-321-1", LocalDate::from); // ignored wrong day-of-week in test_resolverFields_ignoreCrossCheck()
228 TemporalAccessor parsed = f.parse("2012"); in test_resolverFields_emptyList()
236 TemporalAccessor parsed = f.parse("2012"); in test_resolverFields_listOfOneMatching()
244 TemporalAccessor parsed = f.parse("2012"); in test_resolverFields_listOfOneNotMatching()
253 TemporalAccessor parsed = f.parse("2012"); in test_resolverFields_listOfOneNull()
[all …]
/libcore/benchmarks/src/benchmarks/regression/
DSimpleDateFormatBenchmark.java42 sdf.parse("2000.01.01 PST"); in time_parseWithTimeZoneShort()
49 sdf.parse("2000.01.01 Pacific Standard Time"); in time_parseWithTimeZoneLong()
56 sdf.parse("2000.01.01"); in time_parseWithoutTimeZone()
63 sdf.parse("2000.01.01 PST"); in time_createAndParseWithTimeZoneShort()
70 sdf.parse("2000.01.01 Pacific Standard Time"); in time_createAndParseWithTimeZoneLong()
106 sdf.parse("2000.1.1 Kubanische Normalzeit"); in main()
/libcore/luni/src/test/java/libcore/xml/
DSaxTest.java39 parse(false, false, "<foo bar=\"baz\"/>", new DefaultHandler() { in testNoPrefixesNoNamespaces()
52 parse(false, false, "<a:foo a:bar=\"baz\"/>", new DefaultHandler() { in testNoPrefixesNoNamespaces()
67 parse(false, true, "<foo bar=\"baz\"/>", new DefaultHandler() { in testNoPrefixesYesNamespaces()
80 parse(false, true, "<a:foo a:bar=\"baz\" xmlns:a=\"http://quux\"/>", new DefaultHandler() { in testNoPrefixesYesNamespaces()
99 parse(true, true, "<foo bar=\"baz\"/>", new DefaultHandler() { in testYesPrefixesYesNamespaces()
112 parse(true, true, "<a:foo a:bar=\"baz\" xmlns:a=\"http://quux\"/>", new DefaultHandler() { in testYesPrefixesYesNamespaces()
130 parse(true, false, "<foo bar=\"baz\"/>", new DefaultHandler() { in testYesPrefixesNoNamespaces()
143 parse(true, false, "<a:foo a:bar=\"baz\"/>", new DefaultHandler() { in testYesPrefixesNoNamespaces()
200 reader.parse(new InputSource(new StringReader(xml))); in testDisableExternalEntities()
203 private void parse(boolean prefixes, boolean namespaces, String xml, in parse() method in SaxTest
[all …]
DExpatSaxParserTest.java58 parse(xml.toString(), new DefaultHandler()); in testGlobalReferenceTableOverflow()
72 parse(SNIPPET, contentHandler); in testExceptions()
86 parse(SNIPPET, contentHandler); in testExceptions()
99 parse(SNIPPET, contentHandler); in testExceptions()
108 parse(SNIPPET, handler); in testSax()
113 parse(new StringReader(SNIPPET), handler); in testSax()
118 parse(new ByteArrayInputStream(SNIPPET.getBytes()), in testSax()
178 parse(XML, handler); in testNamespaces()
367 reader.parse(new InputSource(in)); in runDtdTest()
468 reader.parse(new InputSource(in)); in testCdata()
[all …]
/libcore/luni/src/test/java/libcore/java/time/format/
DDateTimeFormatterBuilderTest.java79 formatter.parse("Europe/London").query(TemporalQueries.zoneId())); in test_appendZoneRegionId_parse()
81 formatter.parse("UTC").query(TemporalQueries.zoneId())); in test_appendZoneRegionId_parse()
83 formatter.parse("GMT+01:00").query(TemporalQueries.zoneId())); in test_appendZoneRegionId_parse()
87 formatter.parse("UTC+01:00").query(TemporalQueries.zoneId())); in test_appendZoneRegionId_parse()
90 formatter.parse("+01:00").query(TemporalQueries.zoneId())); in test_appendZoneRegionId_parse()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/text/
DDecimalFormatTest.java68 Number result = form.parse("123.123"); in test_parse_bigDecimal()
74 result = form.parse("123.123"); in test_parse_bigDecimal()
84 Number result = format.parse("123.123"); in test_parse_integerOnly()
89 result = format.parse("123.123"); in test_parse_integerOnly()
96 Number number = form.parse("23.1", new ParsePosition(0)); in test_parse_returnType()
103 number = form.parse("23.1", new ParsePosition(0)); in test_parse_returnType()
107 number = form.parse("23.1", new ParsePosition(0)); in test_parse_returnType()
118 number = form.parse("23.1f", new ParsePosition(0)); in test_parse_returnType()
122 number = form.parse("23.0", new ParsePosition(0)); in test_parse_returnType()
125 number = form.parse("-0.0", new ParsePosition(0)); in test_parse_returnType()
[all …]
/libcore/luni/src/main/java/org/apache/harmony/xml/
DExpatReader.java257 public void parse(InputSource input) throws IOException, SAXException { in parse() method in ExpatReader
275 parse(reader, input.getPublicId(), input.getSystemId()); in parse()
287 parse(in, encoding, input.getPublicId(), input.getSystemId()); in parse()
302 parse(in, encoding, input.getPublicId(), systemId); in parse()
308 private void parse(Reader in, String publicId, String systemId) in parse() method in ExpatReader
320 private void parse(InputStream in, String charsetName, String publicId, String systemId) in parse() method in ExpatReader
327 public void parse(String systemId) throws IOException, SAXException { in parse() method in ExpatReader
328 parse(new InputSource(systemId)); in parse()
/libcore/luni/src/main/java/libcore/net/http/
DHttpDate.java73 public static Date parse(String value) { in parse() method in HttpDate
75 return STANDARD_DATE_FORMAT.get().parse(value); in parse()
80 return new SimpleDateFormat(formatString, Locale.US).parse(value); in parse()
/libcore/ojluni/src/test/java/time/tck/java/time/temporal/
DTCKIsoFields.java158 LocalDate parsed = LocalDate.parse(date.getYear() + "-" + qoy + "-" + doq, f); in test_parse_quarters()
169 LocalDate parsed = LocalDate.parse(date.getYear() + "-" + qoy + "-" + doq, f); in test_parse_quarters_SMART()
180 LocalDate parsed = LocalDate.parse(date.getYear() + "-" + qoy + "-" + doq, f); in test_parse_quarters_LENIENT()
215 LocalDate.parse(str, f); in test_parse_parseLenientQuarter_STRICT()
226 LocalDate parsed = LocalDate.parse(str, f); in test_parse_parseLenientQuarter_SMART()
230 LocalDate.parse(str, f); in test_parse_parseLenientQuarter_SMART()
245 LocalDate parsed = LocalDate.parse(str, f); in test_parse_parseLenientQuarter_LENIENT()
357 LocalDate parsed = LocalDate.parse(wby + "-" + week + "-" + dow.getValue(), f); in test_parse_weeks_STRICT()
368 LocalDate parsed = LocalDate.parse(wby + "-" + week + "-" + dow.getValue(), f); in test_parse_weeks_SMART()
379 LocalDate parsed = LocalDate.parse(wby + "-" + week + "-" + dow.getValue(), f); in test_parse_weeks_LENIENT()
[all …]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/
DDateTest.java303 Date d = new Date(Date.parse("13 October 1998")); in test_parseLjava_lang_String()
310 d = new Date(Date.parse("Jan-12 1999")); in test_parseLjava_lang_String()
313 d = new Date(Date.parse("Jan12-1999")); in test_parseLjava_lang_String()
316 d = new Date(Date.parse("Jan12 69-1")); in test_parseLjava_lang_String()
321 d = new Date(Date.parse("6:45:13 3/2/1200 MST")); in test_parseLjava_lang_String()
326 d = new Date(Date.parse("Mon, 22 Nov 1999 12:52:06 GMT")); in test_parseLjava_lang_String()
334 Date.parse(null); in test_parseLjava_lang_String()
342 -5400000, Date.parse("Sat, 1 Jan 1970 +0130 00:00:00")); in test_parseLjava_lang_String()
344 858600000, Date.parse("00:00:00 GMT +0130 Sat, 11 Jan 1970")); in test_parseLjava_lang_String()
/libcore/ojluni/src/main/java/sun/security/timestamp/
DTimestampToken.java93 parse(timestampTokenInfo); in TimestampToken()
134 private void parse(byte[] timestampTokenInfo) throws IOException { in parse() method in TimestampToken
148 hashAlgorithm = AlgorithmId.parse(messageImprint.data.getDerValue()); in parse()

12345678