Home
last modified time | relevance | path

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

1234

/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/luni/src/test/java/libcore/java/text/
DOldDecimalFormatTestICU.java77 assertEquals(123, format.parse("xxxxxxxxx123.0").intValue()); in test_paddingPattern()
86 assertEquals(2, format.parse("\u00e72 o'clock").intValue()); in test_paddingPattern()
87 assertEquals(12, format.parse("12 o'clock").intValue()); in test_paddingPattern()
111 assertEquals(100, format.parse("1E+2").intValue()); in test_positiveExponentSign()
112 assertEquals(0.01f, format.parse("1E-2").floatValue()); in test_positiveExponentSign()
116 assertEquals(100, format.parse("1E2 m/s").intValue()); in test_positiveExponentSign()
120 assertEquals(0.00123f, format.parse("12.3E-4").floatValue()); in test_positiveExponentSign()
124 assertEquals(12345, format.parse("12.345E3").intValue()); in test_positiveExponentSign()
139 assertEquals(1234567890, format.parse("123,456,7890").intValue()); in test_secondaryGroupingSize()
142 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
210 format.parse("not a Date"); in test_parseLString()
219 Date date = format.parse(format.format(current).toString()); in test_parseLString()
232 format.parse("27/08/1998"); in test_parseLString()
238 format.parse("30/30/908 4:50, PDT"); in test_parseLString()
244 format.parse("837039928046"); in test_parseLString()
252 Date date = format.parse(format.format(current).toString()); in test_parseLString()
265 format.parse("Jan 16 1970"); in test_parseLString()
272 format.parse("27/08/1998"); in test_parseLString()
280 Date date = format.parse(format.format(current).toString()); in test_parseLString()
[all …]
DSimpleDateFormatTest.java188 Date d = sdf.parse(value, pp); in assertCannotParse()
195 Date d = sdf.parse(value, pp); in parseDate()
261 sdf.parse("2010-12-03 00:00:00 -0800"); in testTimeZoneFormatting()
272 Date date = sdf.parse("2010-07-08 02:44:48"); in testTimeZoneFormatting()
284 calendar.setTime(format.parse("2011-06-21T10:00 Pacific Standard Time")); // 18:00 GMT-8 in testDstZoneNameWithNonDstTimestamp()
292 calendar.setTime(format.parse("2010-12-21T10:00 Pacific Daylight Time")); // 17:00 GMT-7 in testNonDstZoneNameWithDstTimestamp()
301 calendar.setTime(format.parse("2011-06-21T20:00 Lord Howe Daylight Time")); // 9:00 GMT+11 in testDstZoneWithNonDstTimestampForNonHourDstZone()
309 calendar.setTime(format.parse("2010-12-21T19:30 Lord Howe Standard Time")); //9:00 GMT+10:30 in testNonDstZoneWithDstTimestampForNonHourDstZone()
324 new SimpleDateFormat("z", Locale.FRANCE).parse("UTC"); in testParseTimezoneOnly()
325 new SimpleDateFormat("z", Locale.US).parse("UTC"); in testParseTimezoneOnly()
[all …]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/net/
DHttpCookieTest.java497 HttpCookie.parse(null); in test_Parse_exception()
561 .parse("Set-Cookie:name=test;expires=Thu, 30-Oct-2008 19:14:07 GMT;"); in test_Parse_locale()
567 .parse("Set-Cookie:name=test;expires=Sun, 30-Oct-2005 19:14:07 GMT;"); in test_Parse_locale()
573 .parse("Set-Cookie:name=test;max-age=1234;expires=Sun, 30-Oct-2005 19:14:07 GMT;"); in test_Parse_locale()
581 .parse("Set-Cookie:name=test;max-age=-12345;"); in test_Parse_locale()
588 list = HttpCookie.parse("Set-Cookie2:name=test;max-age=1000"); in test_Parse_locale()
599 List<HttpCookie> list = HttpCookie.parse("test=\"null\""); in test_Parse()
614 list = HttpCookie.parse("Set-cookie2:name=\"tes,t\""); in test_Parse()
621 ….parse("Set-cookie2:test=null\";;Port=abde,82;Path=/temp;;;Discard;commentURl=http://harmonytest.o… in test_Parse()
633 ….parse("Set-Cookie:name=tes,t;Comment=version1-cookie;Discard=false;commentURL=vers\nion1-cookie-u… in test_Parse()
[all …]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/javax/xml/parsers/
DDocumentBuilderTest.java92 public Document parse(InputSource is) throws SAXException, IOException { in parse() method in DocumentBuilderTest.MockDocumentBuilder
226 Document d = db.parse(f); in testGetBaseURI()
242 Document d = db.parse(f); in test_parseLjava_io_File()
259 db.parse((File)null); in test_parseLjava_io_File()
271 db.parse(new File("_")); in test_parseLjava_io_File()
282 db.parse(f); in test_parseLjava_io_File()
302 Document d = db.parse(is); in test_parseLjava_io_InputStream()
319 db.parse((InputStream)null); in test_parseLjava_io_InputStream()
331 db.parse(new FileInputStream("_")); in test_parseLjava_io_InputStream()
342 db.parse(is); in test_parseLjava_io_InputStream()
[all …]
DSAXParserTest.java310 parser.parse(list_wf[i], dh); in test_parseLjava_io_FileLorg_xml_sax_helpers_DefaultHandler()
317 parser.parse(list_nwf[i], dh); in test_parseLjava_io_FileLorg_xml_sax_helpers_DefaultHandler()
326 parser.parse((File) null, dh); in test_parseLjava_io_FileLorg_xml_sax_helpers_DefaultHandler()
333 parser.parse(list_wf[0], (DefaultHandler) null); in test_parseLjava_io_FileLorg_xml_sax_helpers_DefaultHandler()
345 parser.parse(list_wf[i], dh); in testParseFileHandlerBase()
358 parser.parse(list_nwf[i], dh); in testParseFileHandlerBase()
371 parser.parse((File) null, dh); in testParseFileHandlerBase()
382 parser.parse(list_wf[0], (HandlerBase) null); in testParseFileHandlerBase()
401 parser.parse(is, dh); in test_parseLorg_xml_sax_InputSourceLorg_xml_sax_helpers_DefaultHandler()
409 parser.parse(is, dh); in test_parseLorg_xml_sax_InputSourceLorg_xml_sax_helpers_DefaultHandler()
[all …]
DDocumentBuilderFactoryTest.java312 db.parse(getClass().getResourceAsStream("/simple.xml")); in test_newDocumentBuilder()
384 Document document = parser.parse(getClass().getResourceAsStream( in test_setCoalescingZ()
412 Document document = parser.parse(getClass().getResourceAsStream( in test_setCoalescingZ()
447 Document document = parser.parse(getClass().getResourceAsStream( in test_setExpandEntityReferencesZ()
470 Document document = parser.parse(getClass().getResourceAsStream( in test_setExpandEntityReferencesZ()
545 Document document = parser.parse(getClass().getResourceAsStream( in test_setIgnoringCommentsZ()
568 Document document = parser.parse(getClass().getResourceAsStream( in test_setIgnoringCommentsZ()
594 Document document = parser.parse(getClass().getResourceAsStream( in test_setIgnoringElementContentWhitespaceZ()
613 Document document = parser.parse(getClass().getResourceAsStream( in test_setIgnoringElementContentWhitespaceZ()
637 Document document = parser.parse(getClass().getResourceAsStream( in test_setNamespaceAwareZ()
[all …]
/libcore/benchmarks/src/benchmarks/regression/
DParseBenchmark.java100 parser.parse(text); in timeParse()
126 void parse(String data) throws Exception; in parse() method
130 @Override public void parse(String data) throws Exception { in parse() method in ParseBenchmark.AndroidStreamParser
181 @Override public void parse(String data) throws Exception { in parse() method in ParseBenchmark.OrgJsonParser
193 @Override public void parse(String data) throws Exception { in parse() method in ParseBenchmark.GeneralXmlPullParser
205 @Override public void parse(String data) throws Exception { in parse() method in ParseBenchmark.XmlDomParser
207 .parse(new InputSource(new StringReader(data))); in parse()
212 @Override public void parse(String data) throws Exception { in parse() method in ParseBenchmark.XmlSaxParser
213 SAXParserFactory.newInstance().newSAXParser().parse( in parse()
/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.java57 parse(xml.toString(), new DefaultHandler()); in testGlobalReferenceTableOverflow()
71 parse(SNIPPET, contentHandler); in testExceptions()
85 parse(SNIPPET, contentHandler); in testExceptions()
98 parse(SNIPPET, contentHandler); in testExceptions()
107 parse(SNIPPET, handler); in testSax()
112 parse(new StringReader(SNIPPET), handler); in testSax()
117 parse(new ByteArrayInputStream(SNIPPET.getBytes()), in testSax()
177 parse(XML, handler); in testNamespaces()
366 reader.parse(new InputSource(in)); in runDtdTest()
467 reader.parse(new InputSource(in)); in testCdata()
[all …]
/libcore/luni/src/main/java/org/apache/harmony/xml/
DExpatReader.java249 public void parse(InputSource input) throws IOException, SAXException { in parse() method in ExpatReader
267 parse(reader, input.getPublicId(), input.getSystemId()); in parse()
279 parse(in, encoding, input.getPublicId(), input.getSystemId()); in parse()
294 parse(in, encoding, input.getPublicId(), systemId); in parse()
300 private void parse(Reader in, String publicId, String systemId) in parse() method in ExpatReader
312 private void parse(InputStream in, String charsetName, String publicId, String systemId) in parse() method in ExpatReader
319 public void parse(String systemId) throws IOException, SAXException { in parse() method in ExpatReader
320 parse(new InputSource(systemId)); in parse()
/libcore/luni/src/main/java/libcore/net/http/
DHttpDate.java71 public static Date parse(String value) { in parse() method in HttpDate
73 return STANDARD_DATE_FORMAT.get().parse(value); in parse()
78 return new SimpleDateFormat(formatString, Locale.US).parse(value); in 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 …]
DParseExceptionTest.java31 df.parse("HelloWorld"); in test_ConstructorLjava_lang_StringI()
44 df.parse("1999HelloWorld"); in test_getErrorOffset()
DSimpleDateFormatTest.java638 Date date = df.parse(output); in test_parseLjava_lang_StringLjava_text_ParsePosition()
643 date = df.parse(output); in test_parseLjava_lang_StringLjava_text_ParsePosition()
648 date = df.parse(output); in test_parseLjava_lang_StringLjava_text_ParsePosition()
653 date = df.parse(output); in test_parseLjava_lang_StringLjava_text_ParsePosition()
657 date = df.parse("5 January 2002 70"); in test_parseLjava_lang_StringLjava_text_ParsePosition()
662 date = df.parse("3 12 5 March 2002 Monday"); in test_parseLjava_lang_StringLjava_text_ParsePosition()
667 date = df.parse("12 3 5 March 2002 Monday"); in test_parseLjava_lang_StringLjava_text_ParsePosition()
672 date = df.parse("2 5 March 2002 Monday"); in test_parseLjava_lang_StringLjava_text_ParsePosition()
677 date = df.parse("11 5 January 2002 Monday"); in test_parseLjava_lang_StringLjava_text_ParsePosition()
682 date = df.parse("11 5 2002 Monday January"); in test_parseLjava_lang_StringLjava_text_ParsePosition()
[all …]
/libcore/luni/src/main/java/org/xml/sax/
DParser.java179 public abstract void parse (InputSource source) in parse() method
205 public abstract void parse (String systemId) in parse() method
DXMLReader.java375 public void parse (InputSource input) in parse() method
401 public void parse (String systemId) in parse() method
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/org/xml/sax/support/
DNoSubclassParser.java33 public void parse(InputSource source) { in parse() method in NoSubclassParser
36 public void parse(String systemId) { in parse() method in NoSubclassParser
DNoAccessParser.java34 public void parse(InputSource source) { in parse() method in NoAccessParser
37 public void parse(String systemId) { in parse() method in NoAccessParser
DNoInstanceParser.java37 public void parse(InputSource source) { in parse() method in NoInstanceParser
40 public void parse(String systemId) { in parse() method in NoInstanceParser
DDoNothingParser.java34 public void parse(InputSource source) { in parse() method in DoNothingParser
37 public void parse(String systemId) { in parse() method in DoNothingParser
DNoSubclassXMLReader.java55 public void parse(InputSource input) { in parse() method in NoSubclassXMLReader
58 public void parse(String systemId) { in parse() method in NoSubclassXMLReader
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/
DDateTest.java302 Date d = new Date(Date.parse("13 October 1998")); in test_parseLjava_lang_String()
309 d = new Date(Date.parse("Jan-12 1999")); in test_parseLjava_lang_String()
312 d = new Date(Date.parse("Jan12-1999")); in test_parseLjava_lang_String()
315 d = new Date(Date.parse("Jan12 69-1")); in test_parseLjava_lang_String()
320 d = new Date(Date.parse("6:45:13 3/2/1200 MST")); in test_parseLjava_lang_String()
325 d = new Date(Date.parse("Mon, 22 Nov 1999 12:52:06 GMT")); in test_parseLjava_lang_String()
333 Date.parse(null); in test_parseLjava_lang_String()
341 -5400000, Date.parse("Sat, 1 Jan 1970 +0130 00:00:00")); in test_parseLjava_lang_String()
343 858600000, Date.parse("00:00:00 GMT +0130 Sat, 11 Jan 1970")); in test_parseLjava_lang_String()

1234