public class

TEvernoteHttpClient

extends TTransport
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.
Public Methods
void cancel()
void close()
void flush()
boolean isOpen()
void open()
int read(byte[] buf, int off, int len)
void reset()
void setConnectTimeout(int timeout)
void setCustomHeader(String key, String value)
void setCustomHeaders(Map<String, String> headers)
void setReadTimeout(int timeout)
void write(byte[] buf, int off, int len)
[Expand]
Inherited Methods
From class com.evernote.thrift.transport.TTransport
From class java.lang.Object

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 void cancel ()

public void close ()

public void flush ()

Throws
TTransportException

public boolean isOpen ()

public void open ()

public int read (byte[] buf, int off, int len)

Throws
TTransportException

public void reset ()

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)