Changeset 19224 for lang/java

Show
Ignore:
Timestamp:
09/12/08 16:41:23 (2 months ago)
Author:
regtan
Message:

クラス名などを変更 getMarquee追加対応の途中

Location:
lang/java/niconico4j/trunk
Files:
2 modified
1 moved

Legend:

Unmodified
Added
Removed
  • lang/java/niconico4j/trunk/src/analyzer/GetFlvXmlPather.java

    r18086 r19224  
    1919import exception.NiconicoException; 
    2020 
    21 public class XmlPather { 
    22         public ThumbInfoBean analyzer(InputStream is) throws NiconicoException, 
     21public class GetFlvXmlPather { 
     22        public ThumbInfoBean getFlv(InputStream is) throws NiconicoException, 
    2323                                                                                                                        SAXException, 
    2424                                                                                                                        IOException 
  • lang/java/niconico4j/trunk/src/connect/HttpConnector.java

    r18086 r19224  
    3030                } 
    3131        } 
     32         
     33        public InputStream getMarqueeInfo(String videoId)throws IOException{ 
     34                try{ 
     35                        //URL 
     36                        StringBuilder urlStrBuilder =  
     37                                new StringBuilder("http://www.nicovideo.jp/api/getmarquee?").append(videoId); 
     38                        String urlStr = urlStrBuilder.toString(); 
     39                        URL url = new URL(urlStr); 
     40 
     41                        HttpURLConnection http = (HttpURLConnection)url.openConnection(); 
     42 
     43                        // GET�Ōq�� 
     44                        http.setRequestMethod("GET"); 
     45 
     46                        // �ڑ� 
     47                        http.connect(); 
     48 
     49                        return http.getInputStream(); 
     50 
     51                }catch( IOException e ){ 
     52                        throw e; 
     53                } 
     54        } 
    3255} 
  • lang/java/niconico4j/trunk/test/test/Test.java

    r18086 r19224  
    77import bean.ThumbInfoBean; 
    88 
    9 import analyzer.XmlPather; 
     9import analyzer.GetFlvXmlPather; 
    1010 
    1111import connect.HttpConnector; 
     
    2121                        InputStream is = connector.getVideoInfo(args[0]); 
    2222                         
    23                         XmlPather parther = new XmlPather(); 
    24                         ThumbInfoBean thumbInfo = parther.analyzer(is); 
     23                        GetFlvXmlPather parther = new GetFlvXmlPather(); 
     24                        ThumbInfoBean thumbInfo = parther.getFlv(is); 
    2525                         
    2626                        //���X�|���X�X�e�[�^�X