HTTPByteReaderS3public class HTTPByteReader
extends Object
| Modifier and Type | Class | Description |
|---|---|---|
protected class |
HTTPByteReader.SendResult |
| Modifier and Type | Field | Description |
|---|---|---|
static int |
BUFFERINCSIZE |
|
protected int |
connectionTimeout |
|
static String |
CRLF |
|
protected org.apache.commons.lang.time.FastDateFormat |
dateFormat |
|
protected java.util.List<String> |
debugInfo |
|
protected String |
debugPrefix |
|
static int |
HEADINDEX_CONTENTLENGTH |
|
static int |
HEADINDEX_LASTMODIFIED |
|
static int |
HEADINDEX_SIZE |
|
static int |
HEADINDEX_STATUS |
|
protected String |
host |
|
static int |
MAXHEADERSIZE |
|
protected int |
maxRetries |
|
protected int |
maxUsesBeforeReconnect |
|
protected StringBuffer |
msgBuf |
|
protected String[] |
parseDateFormats |
|
protected int |
port |
|
protected String |
proxyHost |
|
protected int |
proxyPort |
|
protected int |
readTimeout |
|
protected int |
receiveBufferSize |
|
static int |
RECEIVEBUFFERSIZE |
|
protected String |
reqPath |
|
protected boolean |
requestFullURL |
|
protected int |
sendBufferSize |
|
static int |
SENDBUFFERSIZE |
|
protected java.net.Socket |
socket |
|
static int |
TIMEOUT |
|
protected String |
userAgent |
|
protected int |
uses |
| Constructor | Description |
|---|---|
HTTPByteReader(String host,
int port) |
| Modifier and Type | Method | Description |
|---|---|---|
void |
close() |
|
void |
connect() |
|
HTTPByteReaderResult |
delete(String path) |
|
HTTPByteReaderResult |
deleteDirect(String path) |
|
protected void |
dumpDebug() |
|
protected String |
getConextPath() |
|
int |
getConnectionTimeout() |
|
protected void |
getDeleteCommand(String path) |
|
protected void |
getGetCommand(String path,
long pos,
int flen) |
|
protected void |
getHeadCommand(String path) |
|
int |
getMaxRetries() |
|
int |
getMaxUsesBeforeReconnect() |
|
protected void |
getPostCommand(String path,
PacketFragmentList fragmentList) |
|
int |
getReadTimeout() |
|
int |
getReceiveBufferSize() |
|
protected String |
getRequestPath(String path,
String host,
int port) |
|
int |
getSendBufferSize() |
|
String |
getUserAgent() |
|
long[] |
head(String path) |
|
boolean |
isOpen() |
|
boolean |
isRequestFullURL() |
|
protected void |
parseHeader(HTTPByteReader.SendResult result,
byte[] buffer,
int offset,
int len,
boolean isHead) |
|
HTTPByteReaderResult |
read(String path,
long pos,
int flen) |
|
HTTPByteReaderResult |
readDirect(String path,
long pos,
int flen) |
|
protected void |
reconnect() |
|
HTTPByteReader.SendResult |
sendRequest(byte[] request,
boolean isHead) |
|
HTTPByteReader.SendResult |
sendRequest(byte[] request,
int len,
boolean isHead) |
|
HTTPByteReader.SendResult |
sendRequest(byte[] request,
PacketFragmentList fragmentList,
int len,
boolean isHead) |
|
void |
setConnectionTimeout(int connectionTimeout) |
|
void |
setMaxRetries(int maxRetries) |
|
void |
setMaxUsesBeforeReconnect(int maxUsesBeforeReconnect) |
|
void |
setProxyAddress(String host,
int port) |
|
void |
setReadTimeout(int readTimeout) |
|
void |
setReceiveBufferSize(int receiveBufferSize) |
|
void |
setRequestFullURL(boolean requestFullURL) |
|
void |
setSendBufferSize(int sendBufferSize) |
|
void |
setUserAgent(String userAgent) |
|
HTTPByteReaderResult |
write(String path,
byte[] buffer,
int offset,
int len) |
|
HTTPByteReaderResult |
write(String path,
PacketFragmentList fragmentList) |
|
HTTPByteReaderResult |
write(String path,
String str) |
|
HTTPByteReaderResult |
writeDirect(String path,
PacketFragmentList fragmentList) |
public static final int BUFFERINCSIZE
protected int connectionTimeout
public static final String CRLF
protected org.apache.commons.lang.time.FastDateFormat dateFormat
protected java.util.List<String> debugInfo
protected String debugPrefix
public static final int HEADINDEX_CONTENTLENGTH
public static final int HEADINDEX_LASTMODIFIED
public static final int HEADINDEX_SIZE
public static final int HEADINDEX_STATUS
protected String host
public static final int MAXHEADERSIZE
protected int maxRetries
protected int maxUsesBeforeReconnect
protected StringBuffer msgBuf
protected String[] parseDateFormats
protected int port
protected String proxyHost
protected int proxyPort
protected int readTimeout
protected int receiveBufferSize
public static final int RECEIVEBUFFERSIZE
protected String reqPath
protected boolean requestFullURL
protected int sendBufferSize
public static final int SENDBUFFERSIZE
protected java.net.Socket socket
public static final int TIMEOUT
protected String userAgent
protected int uses
public void close()
public void connect()
public HTTPByteReaderResult delete(String path)
public HTTPByteReaderResult deleteDirect(String path)
protected void dumpDebug()
protected String getConextPath()
public int getConnectionTimeout()
protected void getDeleteCommand(String path)
protected void getGetCommand(String path,
long pos,
int flen)
protected void getHeadCommand(String path)
public int getMaxRetries()
public int getMaxUsesBeforeReconnect()
protected void getPostCommand(String path,
PacketFragmentList fragmentList)
public int getReadTimeout()
public int getReceiveBufferSize()
protected String getRequestPath(String path,
String host,
int port)
public int getSendBufferSize()
public String getUserAgent()
public long[] head(String path)
public boolean isOpen()
public boolean isRequestFullURL()
protected void parseHeader(HTTPByteReader.SendResult result, byte[] buffer, int offset, int len, boolean isHead)
public HTTPByteReaderResult read(String path, long pos, int flen)
public HTTPByteReaderResult readDirect(String path, long pos, int flen)
protected void reconnect()
public HTTPByteReader.SendResult sendRequest(byte[] request, boolean isHead)
public HTTPByteReader.SendResult sendRequest(byte[] request, int len, boolean isHead)
public HTTPByteReader.SendResult sendRequest(byte[] request, PacketFragmentList fragmentList, int len, boolean isHead)
public void setConnectionTimeout(int connectionTimeout)
public void setMaxRetries(int maxRetries)
public void setMaxUsesBeforeReconnect(int maxUsesBeforeReconnect)
public void setProxyAddress(String host,
int port)
public void setReadTimeout(int readTimeout)
public void setReceiveBufferSize(int receiveBufferSize)
public void setRequestFullURL(boolean requestFullURL)
public void setSendBufferSize(int sendBufferSize)
public void setUserAgent(String userAgent)
public HTTPByteReaderResult write(String path, byte[] buffer, int offset, int len)
public HTTPByteReaderResult write(String path, PacketFragmentList fragmentList)
public HTTPByteReaderResult write(String path, String str)
public HTTPByteReaderResult writeDirect(String path, PacketFragmentList fragmentList)