Click here to Skip to main content
15,910,121 members
Home / Discussions / C#
   

C#

 
QuestionWebRequest class questions Pin
Stevo Z4-Nov-07 22:14
Stevo Z4-Nov-07 22:14 
AnswerRe: WebRequest class questions Pin
B.A4-Nov-07 23:49
B.A4-Nov-07 23:49 
Questiondate and time problem Pin
NewToAspDotNet4-Nov-07 21:50
NewToAspDotNet4-Nov-07 21:50 
AnswerRe: date and time problem Pin
N a v a n e e t h4-Nov-07 22:04
N a v a n e e t h4-Nov-07 22:04 
AnswerRe: date and time problem Pin
pmarfleet4-Nov-07 22:12
pmarfleet4-Nov-07 22:12 
QuestionGet response stream using java API. Pin
Prateek G4-Nov-07 21:29
Prateek G4-Nov-07 21:29 
AnswerRe: Get response stream using java API. Pin
M LN Rao4-Nov-07 22:17
M LN Rao4-Nov-07 22:17 
GeneralRe: Get response stream using java API. Pin
Prateek G4-Nov-07 23:29
Prateek G4-Nov-07 23:29 
I want to use any java method which takes url and give me response of server.
Why I am doing so is I am using java.util.zip which takes sbyte[] earlier I was getting byte[] (when I was using httpWebRequest and httpWebResponse) and if i was trying to make this conversion byte[] to sbyte[] file which i m getting from server is getting damaged.So what I am thinking is if I can send url to any java method which can give me response back we can directly add this output stream to zipinputstream.

The code which I was using earlier is

HttpWebRequest hReq = (HttpWebRequest)HttpWebRequest.Create(ReqUrl);
HttpWebResponse hResp = (HttpWebResponse)hReq.GetResponse();
Stream str = hResp.GetResponseStream();
MemoryStream output = new MemoryStream();
int nBytesRead = 0;
byte[] buffer = new byte[1024];
while ((nBytesRead = str.Read(buffer, 0, 1024)) > 0)
{
//Read the stream until the end of file in chunks of 1024 bytes
output.Write(buffer, 0, nBytesRead);//Write the currently read bytes into the MemoryStream
}
hResp.Close();
output.Close();
return output.ToArray(); // This .ToArray() method gives me byte[] while i want sbyte[]



Any equivalent method in java can help me out.


Prateek Gupta.
Questionsafely bind data using xml file Pin
cyn84-Nov-07 21:07
cyn84-Nov-07 21:07 
QuestionWinForms and WinForms Pin
ziwez04-Nov-07 20:46
ziwez04-Nov-07 20:46 
AnswerRe: WinForms and WinForms Pin
N a v a n e e t h4-Nov-07 22:07
N a v a n e e t h4-Nov-07 22:07 
AnswerRe: WinForms and WinForms Pin
Christian Graus4-Nov-07 22:09
protectorChristian Graus4-Nov-07 22:09 
AnswerRe: WinForms and WinForms Pin
Pete O'Hanlon4-Nov-07 22:21
mvePete O'Hanlon4-Nov-07 22:21 
QuestionGetting Contents of Address Bar..... Pin
pavya_Cool4-Nov-07 20:29
pavya_Cool4-Nov-07 20:29 
AnswerRe: Getting Contents of Address Bar..... Pin
Michael Sync4-Nov-07 20:38
Michael Sync4-Nov-07 20:38 
AnswerRe: Getting Contents of Address Bar..... Pin
Guffa4-Nov-07 20:50
Guffa4-Nov-07 20:50 
Questiontimers, list boxes and Checked List boxes Pin
galto4-Nov-07 20:27
galto4-Nov-07 20:27 
AnswerRe: timers, list boxes and Checked List boxes Pin
TJoe5-Nov-07 3:32
TJoe5-Nov-07 3:32 
GeneralRe: timers, list boxes and Checked List boxes Pin
galto5-Nov-07 9:57
galto5-Nov-07 9:57 
Questionhow to create manus Pin
ps.srinivasan4-Nov-07 20:11
ps.srinivasan4-Nov-07 20:11 
AnswerRe: how to create manus Pin
galto4-Nov-07 20:32
galto4-Nov-07 20:32 
AnswerRe: how to create manus Pin
Giorgi Dalakishvili4-Nov-07 20:33
mentorGiorgi Dalakishvili4-Nov-07 20:33 
AnswerRe: how to create manus Pin
Ravi Bhavnani5-Nov-07 2:15
professionalRavi Bhavnani5-Nov-07 2:15 
QuestionHow to pass variable to vb6 exe use in C# project? Pin
help as an alias4-Nov-07 19:54
help as an alias4-Nov-07 19:54 
AnswerRe: How to pass variable to vb6 exe use in C# project? Pin
Michael Sync4-Nov-07 20:34
Michael Sync4-Nov-07 20:34 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.