List Info

Thread: WebdavResource putMethod InputStream as parameter




WebdavResource putMethod InputStream as parameter
user name
2006-04-12 20:44:42
hi,

i was wondering if anyone has successfully managed to upload
a file using 
the putMethod with the InputStream as the parameter, (of the
client)?

i have been trying to use:

putMethod(java.lang.String path, java.io.InputStream is)

but when i pass an inputstream, e.g:

N.B. (i've only shown an extract):

String filename = "test.txt";
File f = new File("C:/" + filename);
InputStream inputStream = new FileInputStream(f);
webdavResource.putMethod(serverPath, inputStream);


i get the exception:

java.net.SocketException: Software caused connection abort:
recv failed

am i using the method incorrectly or do i need to setup some
sort of 
bufferedReader of file bufferedReader???


dawlton.


Disclaimer: My advice comes as is, without any guarantee.
Use it at your 
discretion. I cannot be held responsible for your actions.

____________________________________________________________
_____
Are you using the latest version of MSN Messenger? Download
MSN Messenger 
7.5 today! http://join.ms
n.com/messenger/overview


------------------------------------------------------------
---------
To unsubscribe, e-mail: slide-user-unsubscribejakarta.apache.org
For additional commands, e-mail: slide-user-helpjakarta.apache.org

a pill for this and that
user name
2006-04-12 17:01:15
 
In a message dated 4/12/2006 9:00:29 AM Pacific Standard
Time,  
SSRI-Crusaders@yahoogroups.com writes:

also, i  have anxiety problems, big nasty trial,
years of bad state run therapy  facilities, in 8 years
charlie, i been
on wellbutrin, risperdone, ritalin,  cymbalta, paxil, as
well as others
(they just cant seem to find a pill that  will shut me up
LOL) less
therapy + more pills = me getting pissed off at  the state
of missouri




Just mroe proof that the pills are useless, especially for 
PTSD.


[Non-text portions of this message have been removed]



 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://
groups.yahoo.com/group/SSRI-Crusaders/

<*> To unsubscribe from this group, send an email to:
    SSRI-Crusaders-unsubscribe@yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.c
om/info/terms/
 



WebdavResource putMethod InputStream as parameter
user name
2006-04-13 09:10:57
Hello Jimi,

 Here is a code snippet, which I'm using with success,
which uses a put
method relying on an input stream:

WebdavResource source =
WebdavUtils.setupWebdavConnection(sourceLocation);
WebdavResource target =
WebdavUtils.setupWebdavConnection(targetLocation);

InputStream is = source.getMethodData();
sucess = target.putMethod(is);
			
is.close();
source.close();
target.close();


The setupWebdavConnection is just a helper method that sets
up the web proxy
and username/password information on a WebdavResource
instance.

Hope this helps,
Miguel Figueiredo

-----Original Message-----
From: Jimi Dawlton [mailto:jdawhotmail.com] 
Sent: quarta-feira, 12 de Abril de 2006 21:45
To: slide-userjakarta.apache.org
Subject: WebdavResource putMethod InputStream as parameter

hi,

i was wondering if anyone has successfully managed to upload
a file using 
the putMethod with the InputStream as the parameter, (of the
client)?

i have been trying to use:

putMethod(java.lang.String path, java.io.InputStream is)

but when i pass an inputstream, e.g:

N.B. (i've only shown an extract):

String filename = "test.txt";
File f = new File("C:/" + filename);
InputStream inputStream = new FileInputStream(f);
webdavResource.putMethod(serverPath, inputStream);


i get the exception:

java.net.SocketException: Software caused connection abort:
recv failed

am i using the method incorrectly or do i need to setup some
sort of 
bufferedReader of file bufferedReader???


dawlton.


Disclaimer: My advice comes as is, without any guarantee.
Use it at your 
discretion. I cannot be held responsible for your actions.

____________________________________________________________
_____
Are you using the latest version of MSN Messenger? Download
MSN Messenger 
7.5 today! http://join.ms
n.com/messenger/overview


------------------------------------------------------------
---------
To unsubscribe, e-mail: slide-user-unsubscribejakarta.apache.org
For additional commands, e-mail: slide-user-helpjakarta.apache.org


------------------------------------------------------------
---------
To unsubscribe, e-mail: slide-user-unsubscribejakarta.apache.org
For additional commands, e-mail: slide-user-helpjakarta.apache.org

[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )