4 * License : The MIT License
\r
5 * Copyright(c) 2009 olyutorskii
\r
8 package jp.sourceforge.jindolf;
\r
10 import java.net.URL;
\r
11 import jp.sourceforge.jindolf.parser.DecodedContent;
\r
15 * 任意のDecodedContentをラップする。
\r
19 public class HtmlSequence implements CharSequence{
\r
21 private final URL url;
\r
22 private final long datems;
\r
23 private final DecodedContent html;
\r
28 * @param datems 受信時刻(エポックミリ秒)
\r
29 * @param html HTML本文
\r
30 * @throws java.lang.NullPointerException 引数がnull
\r
32 public HtmlSequence(URL url, long datems, DecodedContent html)
\r
33 throws NullPointerException{
\r
34 if(url == null || html == null){
\r
35 throw new NullPointerException();
\r
38 this.datems = datems;
\r
47 public URL getURL(){
\r
56 public long getDateMs(){
\r
64 public DecodedContent getContent(){
\r
70 * @param index {@inheritDoc}
\r
71 * @return {@inheritDoc}
\r
73 public char charAt(int index){
\r
74 return this.html.charAt(index);
\r
79 * @return {@inheritDoc}
\r
81 public int length(){
\r
82 return this.html.length();
\r
87 * @param start {@inheritDoc}
\r
88 * @param end {@inheritDoc}
\r
89 * @return {@inheritDoc}
\r
91 public CharSequence subSequence(int start, int end){
\r
92 return this.html.subSequence(start, end);
\r
97 * @return {@inheritDoc}
\r
100 public String toString(){
\r
101 return this.html.toString();
\r