aresh babu

Ranch Hand
+ Follow
since Aug 31, 2008
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 aresh babu

Hi

I have a code like this



My problem here it is.,
when the accessMethod value is 0 - interMode is assiging as 4050005
when the accessMethod values is 1 - interMode is assigning as 4050002

This issues is happening randomly but not always..
I am using java version java 1.5.0

Could you please let us know how to fix this issue..

Thanks & Regards
Aresh
8 years ago
Hi All,

Please help me how to code for the below requirement...

My requirement is, System A generates a message on particular port 9002(This port number is fixed).

In my local system, i have to read that message from port 9002 and i have to process the message and i need to give the response back to the same 9002 port to the system A.

Please help how can i achieve this in java network programming..

Thanks & Regards
Aresh
Hi All,

My requirement is to add no.of days to date as shown below. The date will be in string format.

So please let me know how to convert the string to date and after conversion how to add no.of days to the date.

For Eg:

rechstring="20120515"
adddays=5
output:20120520

Please help to solve this issue.

Thanks & Regards
Aresh
9 years ago
I think totally 3 objects are eligible for garbage collection.

1. object C3 which is created in main()

2. Integer a which is created in go()

3. c3.story because story is also a wrapper object which is created with object c3

Please correct me if i am wrong...
9 years ago
Hi All,

Thanks alot for your valuable explanation....

And also another doubt is if the code reaches to the place //do morestuff in the above programm, how many objects will be eligible for garbage collection???


Thanks in Advance
9 years ago
Hi All,

Please clarify our doubt.....

Thanks in Advance....
9 years ago
Hi Jeanne ,

i want to load into in a CSV or .txt file.

Please let me know how can i load the data from a table to CSV file without using java(jdbc,hibernate)..

Thanks & Regards
Aresh babu
10 years ago
Hi All,

I would like to know if there is an Oracle feature to change the order of columns in an existing table.

I want to avoid to re-create the table and migrate the data.

Thank you and best regards -
Aresh
10 years ago
Hi All,

Please let us know how to unload oracle table data to a normal file..
10 years ago
Hi All,

Please let me know the efficient way in java how to find the missing numbers from a given billion number(1-K)???
10 years ago
HI All,

i am writing ANT script to call remove server by using telnet task. I wrote like ths

<target name="load">
<telnet server="server name" userid="username" password="pass">
<write>cd sms</write>
<write>ls -al</write>
<write>chmod 777 *</write>
<write> rm -rf folder1</write>
<write>rm -rf test.ear</write>
</telnet>
</target>

Here my problem is i am not able to delete the folder and the ear file also.
But other operations are performing succsfully except deleting the files and folders.

Is there any other way to delete files and folders in the remote system by using ANT script???

Please let me know and help me urgently.


Thanks in advance
ARESH BABU
11 years ago
Hi all ,

i am writing the following code to move a file to another directory.

// File (or directory) to be moved
File file = new File("filename");

// Destination directory
File dir = new File("directoryname");

// Move file to new directory
boolean success = file.renameTo(new File(dir, file.getName()));
if (!success) {
// File was not successfully moved
}

By executing this code the file is moving to new directory but it is not deleting from old directory.
But i want to delete that file in the old directory when i was moving to new directory.\
What may be the wrong in my code???/

Please help me

Thanks & Regards
Aresh Babu
11 years ago
class MyFile{
public static void main(String[] args)throws Exception{
File file=new File("one.txt");
RandomAccessfile raf=new RandomAccessfile(file,rw);
raf.seek(file.lenght());
raf.write("first"+getBytes());
raf.write("second"+getBytes());
}
}
I am using RandomAccessFile to give a chance to differant threads to access this file same time.

please help me

11 years ago
Actually My problem is
File file=new File("one.txt");
RandomAccessfile raf=new RandomAccessfile(file,rw);
raf.seek(file.lenght());
raf.write("first"+getBytes());
raf.write("second"+getBytes());


When i tried to execute this program for the first time it is inserting the 2lines into the respective file.
But if i tried to execute this program for second time only raf.write("second"+getBytes()); is inserting into the file, first line is skipping.
I want to get that first line also in the file

please help me

11 years ago
Hi all,

i am using RandomAccessFile write(bytes b[]) method.
When tried to write multiple lines with multiple write() for the first time it is writing well to a file.
But if i run the same program for the second time first write() method is skpping and all other write() are writing text to the file.
Can any one let me know how to resolve this issue??

Thnaks & Regards
Aresh Babu
11 years ago