01-14 12:56:14.273: INFO/global(450): INFO: Default buffer size used in BufferedInputStream constructor. It would be better to be explicit if a 8k buffer is required.
XML 읽어오는 프로그램 만들다가 생긴 현상입니다.
에러 메세지는 뜨지 않는데 xml데이터를 읽지 못하네요 위와 같은 로그가 남구요..
구글링 해보니 sdk 버그란 사람도 있고..
아래는 해당소스 입니다.
String baseURL="http://www.anddev.org/images/tut/basic/parsingxml/example.xml";
InputStream in = null ;
try {
SAXParserFactory parserFactory = SAXParserFactory.newInstance();
SAXParser parser = parserFactory.newSAXParser();
DefaultHandler handler = new DefaultHandler();
URL url = new URL(baseURL );
URLConnection connection = url.openConnection();
HttpURLConnection httpConnection = (HttpURLConnection)connection;
int responseCode = httpConnection.getResponseCode();
if (responseCode == HttpURLConnection.HTTP_OK) {
in = httpConnection.getInputStream();
try {
parser.parse(in, handler);
} catch(org.xml.sax.SAXException e) {
Log.v("Parse exception", "MyParseHandler parse exception: " + e.getMessage());
}
}
} catch (Exception e) {
// TODO: handle exception
}