writeTo called twice on custom InputStreamEntity class

2014-02-10 Thread Sachin Shetty
Hi, I have a a custom Entity stream class as below public class GcsCustomInputStreamEntity extends InputStreamEntity { InputStream sourceStream - null; Public GcsCustomInputStreamEntity(InputStream sourceStream) { this.sourceStream = sourceStream }

Random javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated)

2012-12-17 Thread Sachin Shetty
Hi, I am using HttpClient with https and pooled connection manager as follows: SSLContext ctx = SSLContext.getInstance("TLS"); X509TrustManager tm = new X509TrustManager() { public void checkClientTrusted(X509Certificate[] xcs, String string) throws Certificate

RE: How to stream a file via PUT to multiple HttpClients

2011-07-20 Thread Sachin Shetty
t be the best option available to you. Otherwise you will have to use HttpUrlConnection or some other HTTP client. Oleg > On Wed, Jul 20, 2011 at 9:20 AM, Sachin Shetty wrote: > > But since I would execute client.execute(put1) and client.execute(put2) > > serially in a single th

RE: How to stream a file via PUT to multiple HttpClients

2011-07-20 Thread Sachin Shetty
Then your ForkedInputStream takes care of reading from the underlying File (perhaps on demand) and keeping the multiple writers in as much lockstep or with as much buffering as desired. Jon On Wed, Jul 20, 2011 at 6:02 AM, Sachin Shetty wrote: > Hi, > > > > We have a unique case wh

How to stream a file via PUT to multiple HttpClients

2011-07-20 Thread Sachin Shetty
Hi, We have a unique case where we want to put a file via HTTP PUT to more than one http servers but we want to read the file only once which means we want to read a block of data from the file and write to two entities simultaneously. Streaming the PUT and reading the file only once without