📄 htmlpageimpl.java
字号:
// Decompiled by Jad v1.5.8e2. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://kpdus.tripod.com/jad.html
// Decompiler options: packimports(3) fieldsfirst ansi space
// Source File Name: HTMLPageImpl.java
package org.gudy.azureus2.core3.html.impl;
import java.io.*;
import java.net.MalformedURLException;
import java.net.URL;
import org.gudy.azureus2.core3.html.HTMLException;
import org.gudy.azureus2.core3.html.HTMLPage;
import org.gudy.azureus2.core3.util.Debug;
// Referenced classes of package org.gudy.azureus2.core3.html.impl:
// HTMLChunkImpl
public class HTMLPageImpl extends HTMLChunkImpl
implements HTMLPage
{
public HTMLPageImpl(InputStream is, String charset, boolean close_file)
throws HTMLException
{
BufferedReader br;
Exception exception;
br = null;
StringBuffer res = new StringBuffer(1024);
try
{
if (charset == null)
br = new BufferedReader(new InputStreamReader(is));
else
br = new BufferedReader(new InputStreamReader(is, charset));
do
{
String line = br.readLine();
if (line == null)
break;
res.append(line);
} while (true);
setContent(res.toString());
}
catch (IOException e)
{
throw new HTMLException("Error reading HTML page", e);
}
finally
{
if (br == null || !close_file) goto _L0; else goto _L0
}
if (br != null && close_file)
try
{
br.close();
}
catch (IOException e)
{
Debug.printStackTrace(e);
}
break MISSING_BLOCK_LABEL_166;
try
{
br.close();
}
catch (IOException e)
{
Debug.printStackTrace(e);
}
throw exception;
}
public URL getMetaRefreshURL()
{
String tags[];
int i;
tags = getTags("META");
i = 0;
_L3:
if (i >= tags.length) goto _L2; else goto _L1
_L1:
String tag;
int url_start;
int e2;
tag = tags[i];
String lc_tag = tag.toLowerCase();
int pos = lc_tag.indexOf("http-equiv=\"refresh\"");
url_start = lc_tag.indexOf("url=");
if (pos == -1 || url_start == -1)
continue; /* Loop/switch isn't completed */
url_start += 4;
int e1 = lc_tag.indexOf("\"", url_start);
e2 = lc_tag.indexOf(">", url_start);
if (e1 == -1)
continue; /* Loop/switch isn't completed */
e2 = e1;
return new URL(tag.substring(url_start, e2).trim());
MalformedURLException e;
e;
Debug.printStackTrace(e);
i++;
goto _L3
_L2:
return null;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -