java.lang.Object |
↳ |
com.evernote.thrift.transport.TTransport |
|
↳ |
com.evernote.client.conn.mobile.TEvernoteHttpClient |
Class Overview
HTTP implementation of the TTransport interface modified by Evernote to work
on Android. Instead of caching in memory, large Thrift messages are cached on
disk before being sent to the Thrift server.
Summary
Public Constructors |
|
TEvernoteHttpClient(String url, String userAgent, File tempDir)
Create a new TAndroidHttpClient.
|
[Expand]
Inherited Methods |
From class
com.evernote.thrift.transport.TTransport
abstract
void
|
close()
|
void
|
consumeBuffer(int arg0)
|
void
|
flush()
|
byte[]
|
getBuffer()
|
int
|
getBufferPosition()
|
int
|
getBytesRemainingInBuffer()
|
abstract
boolean
|
isOpen()
|
abstract
void
|
open()
|
boolean
|
peek()
|
abstract
int
|
read(byte[] arg0, int arg1, int arg2)
|
int
|
readAll(byte[] arg0, int arg1, int arg2)
|
abstract
void
|
write(byte[] arg0, int arg1, int arg2)
|
void
|
write(byte[] arg0)
|
|
From class
java.lang.Object
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
void
|
finalize()
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
|
Public Constructors
public
TEvernoteHttpClient
(String url, String userAgent, File tempDir)
Create a new TAndroidHttpClient.
Parameters
url |
The Thrift server URL, for example, https://www.evernote.com/edam/user. |
userAgent |
The User-Agent string to send, which should identify the
client application. |
Throws
TTransportException
| If an error occurs creating the temporary
file that will be used to cache Thrift messages to disk before sending.
|
Public Methods
public
int
read
(byte[] buf, int off, int len)
public
void
setConnectTimeout
(int timeout)
public
void
setCustomHeader
(String key, String value)
public
void
setCustomHeaders
(Map<String, String> headers)
public
void
setReadTimeout
(int timeout)
public
void
write
(byte[] buf, int off, int len)