private static final Logger logger = LoggerFactory.getLogger(Util.class);
static ResultParse rp = new ResultParse();
+ static WatchParse wp = new WatchParse();
static UserInfo ui = new UserInfo();
public static String getExtention(String contentType) {
return rp.parse(is);
}
- public static TreeMap<Integer,String> getOtherPages(InputStream is) {
+ public static TreeMap<Integer, String> getOtherPages(InputStream is) {
return rp.getOtherPages(is);
}
/**
* ユーザIDを取得する
+ *
* @param is ニコニコ動画のウォッチページストリーム.
* @return ユーザID. 取得できなければnull.
*/
/**
* 違反通報ページURLを取得する.
+ *
* @param is ニコニコ動画のウォッチページストリーム.
* @return 違反通報ページURL. 取得できなければnull.
*/
/**
* ユーザ名を取得する.
+ *
* @param is 違反通報ページストリーム.
* @return ユーザ名. 取得できなければnull.
*/
}
return userName;
}
+
+ /**
+ * Watchページから動画タイトルを取得する.
+ *
+ * @param watchPage watchページストリーム.
+ * @return 動画名.
+ */
+ public static String getTitle(InputStream watchPage) {
+ return wp.getTitle(watchPage);
+ }
}