arun mahajan

Ranch Hand
+ Follow
since Dec 07, 2001
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by arun mahajan

Hi,

I was trying to go through with exception handling and found that any exception thrown by a method should be catch. but when I tried following code it works and have not shown any error while compiling while the method as per javadoc throws IndexOutOfBoundsException.




Could you help me to understand.
8 years ago
Hello Everybody,


I am trying to make a connection with a server on a particular port and read & write data through this conenction. ALl goes well and I am able to make conenction & read & wrtie through this but while I am trying to run this program continuously it starts throwing error:

<b>Connection reset by peer: socket write error</b>

00:23:30 Exception: java.net.SocketException: Connection reset by peer: socket write error
at java.net.SocketOutputStream.socketWrite0(Native Method)
at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:69)
at java.io.BufferedOutputStream.write(BufferedOutputStream.java:113)
at com.logica.smpp.TCPIPConnection.send(TCPIPConnection.java:353)
at com.logica.smpp.Transmitter.send(Transmitter.java:79)
at com.logica.smpp.Session.send(Session.java:993)
at com.logica.smpp.Session.send(Session.java:1048)
at com.logica.smpp.Session.enquireLink(Session.java:789)
at SmppReceive.enquireLink(SmppReceive.java:437)
at SmppReceive.receive(SmppReceive.java:538)
at SmppReceive.main(SmppReceive.java:169)

I tried finding on web but not much help. My questions are:

1. if this error means the connection is closed by the other end than what could be the probable causes?

2. Why it succeeded to make another connection same time?

3. If I tried to ping or telnet on the particular port why it shows communication while program show the above error.

Would be highly obliged if you could help me to understand the problem.

regards,
Arun
[ June 07, 2006: Message edited by: arun mahajan ]
16 years ago
Thanks fo ryour reply.

I also tried this way:

String str = new String(bb);

if(str.length()<1)
System.out.println("Array is empty");

Though seems a bit inefficient

//br Arun
16 years ago
Dear All,

I am decalring following:

byte[] bb = new byte[512];

and want to know after some processing that if all elements of this bb byte array are null or not. Is there any way of finding the same except runnign a while loop?

regards
Arun
16 years ago
Hello Everybody,

I am bit confused and try to find out which is the best way of Initializing the variable sum here. My questions are:

1. If I define the second way, does it mean it will put more load on the system.

2. does the efficiency get reduce in second method, as it is Initializing every time.

Please help me to find a answer.

Thanks & regards

Arun

Code I:

Code II:

[ March 27, 2006: Message edited by: arun mahajan ]
16 years ago
Hello Everybody,

I am bit confused and try to find out which is the best way of Initializing the variable sum here. My questions are:

1. If I define the second way, does it mean it will put more load on the system.

2. does the efficiency get reduce in second method, as it is Initializing every time.

Please help me to find a answer.

Thanks & regards

Arun

Code I:

Code II:

[ March 27, 2006: Message edited by: arun mahajan ]
16 years ago
HI Everybody,

It *MUST* have been asked earlier but somehow I am not able to find out an answer for this.

1. What is SOAP(Simple Object Access Protocol) all about?

2. Where can I use this?

3. Does this has anything to do with HTTP replacement?

4. Why I need SOAP?

Can somebody help me to find the above questions answers? Perhaps if you can provide me some reference link to start with.

With BEst Regards,
Arun
17 years ago
Any taker for this. Would be highly obliged if someone can spare some moments and helpme out

regards,
arun
17 years ago
Hello,

Can you pl spare a moment and let me know :-

1. Is every new call will make a new object?
2. or there will be only location reference value change?
3. WHat will happene if GC gets called?( Just a assumption that it gets activcated after first time we make the tt null)

regards,
Arun

17 years ago
Hello Everybody,

I get stuck up in the following code. I am trying to do the following:

1. Making a connection
2. Writing something on it.
3. Reading from the socket.

Surprisingly while trying to read from the socket it fails toread anything in first attempt. Even trying available() method returns 00. but a subsequent reading always gives me the data back available on the socket. Though even in this attempt the available() method returns 0.

Why it is showing such a behaviour? Am I doing something wrong? Can you pl help me

regards,
Arun

17 years ago
Hello Everybody,

I get stuck up in the following code. I am trying to do the following:

1. Making a connection
2. Writing something on it.
3. Reading from the socket.

Surprisingly while trying to read from the socket it fails toread anything in first attempt. Even trying available() method returns 00. but a subsequent reading always gives me the data back available on the socket. Though even in this attempt the available() method returns 0.

Why it is showing such a behaviour? Am I doing something wrong? Can you pl help me

regards,
Arun

17 years ago
Hi Everybody,

I could remember there was some write up by Cindy on the above two.. could not able to locate on the site. Can somebody help me?

regards,
arun
17 years ago
Hello Everybody,
I am trying to make one program for windows in Java. The objective is to make a auto Dialer type of stuff for connecting to Internet. The flow would be as follows:
1. Will run a setup program.
2. This setup program will make a icon at the network neighbourhood.
3. Will ask to select a driver for a particular modem brand and wil copy it.
4. Once above done, user need to just click at connect to just get connected.
I don't know how to do step 2 and 3 i.e making icon and copyng the drivers. Perhaps this is a question which does not belong here but also don't know where to ask.
I would be highly obliged if some one can spare a moment and let me know how to proceed on this.
regards,
Arun
18 years ago
Hello Everybody,
I am trying to make one program for windows in Java. The objective is to make a auto Dialer type of stuff for connecting to Internet. The flow would be as follows:
1. Will run a setup program.
2. This setup program will make a icon at the network neighbourhood.
3. Will ask to select a driver for a particular modem brand and wil copy it.
4. Once above done, user need to just click at connect to just get connected.
I don't know how to do step 2 and 3 i.e making icon and copyng the drivers. Perhaps this is a question which does not belong here but also don't know where to ask.
I would be highly obliged if some one can spare a moment and let me know how to proceed on this.
regards,
Arun
18 years ago
Hello,
Is it possible to set this classpath programatically too!!
Arun
18 years ago