transfer « Operation « Java I/O Q&A





1. What is the best way to transfer a file using Java?    stackoverflow.com

I am writing code for uploading a file from a client to my server and the performance isn't as fast as I think it should be. I have the current code snippet ...

2. Java File Transfer API    stackoverflow.com

I need to transfer files to my web server for processing and I'd like to do it in a generic way if possible. I need to be able to transfer files from ...

3. Creating managed file transfer software in java    stackoverflow.com

I have been asked to do some POC on how we can provide a software solution which will be able to manage files. Manage files means it will be able to ...

4. Efficient bulk data transfer through I/O in Java    stackoverflow.com

Is there an efficient mechanism in Java for transferring large amounts of data (~10 GB) back and forth between the disk and the network on a low-end machine? Low-end machine meaning ...

5. Java file transfer    stackoverflow.com

I am using the code in Java TCP socket: data transfer is slow, works nice but i have one problem on the receiving part it reads the data but doesn't ...

6. P2P java file transfer    stackoverflow.com

First off, I am VERY new to Java, but wanted to know if it was possible. I could not find any tutorials or explanation online: Is it possible to send/receive files not ...

7. How to transfer a bunch of files over internet    coderanch.com

An ftp or sftp program will suit your needs. If your realy issue is performance, your problem isn't the right program or the right programming language: it's the bandwidth you have available. There's nothing mysterious about transfer speed. Take your load size (e.g., 5 MB) and your network bandwidth (56 kpbs), and divide the former by the latter to get the ...

8. Transfer files between different OSs    coderanch.com

Please tell me how to write a Java program which makes a text file in Windows XP enabled PC and send the file to a Linux enabled PC. Class file will be on windows environment and When running it has to create the text file and transfer the file to Linux enalbed PC through the network...

9. accessing buffer to transfer data    coderanch.com

Not sure how far you've gotten, hope to not talk beneath you. So you've got some data you captured from the port, you'll probably need to parse it into values that you will eventually stick to the DB. So of course you need a database, JDBC driver etc. Basically you build a SQL string or set arguments and call a stored ...





10. Object data transfer - Urgent    coderanch.com

I am using java serialization to transfer a object( Hasmap) between client and server. I am using HttpURLConnection to communicate with the server. This approach is not giving the desired response time in data transfer. I have also tried using Externalizable interface instead of Serializable. Could anybody suggest an alternative approach to make the data transfer faster? This is urgent and ...

11. help : file transfer problem    coderanch.com

hi all. I am making aa application of chat in which there is a module of file transfer when the users are online. I have made the receiving end but I face an exception of corruptstream error. Please help me out I am sending the code with this. public class Filetransfer extends JPanel implements ActionListener { JButton btn; JFrame fm; String ...

12. how to transfer a file    coderanch.com

13. Best way for File Transfer    coderanch.com

14. Problem in file transfer    coderanch.com

Hello everyone, I had a problem in doing my mini-project last week and the problem is that when I am performing file transfer using TCP, the file on being received on the client side is having some dummy characters also along with the original file. I have tried a lot but could not eliminate those garbage characters......Please help me out with ...

15. Secure File Transfer    coderanch.com

Hi!! Everyone, I am Ashwin Philar at the University of Alabama at Birmingham. I am a graduate student of the Computer Engineering Department here. I am doing a project that involves invoking a cgi script invoked using https:// protocol and downloading the files whose names appear on the resulting web page from a remote server onto my local machine. Has anyone ...

16. File Transfer    coderanch.com





17. File transfer    coderanch.com

18. File transfer across two systems    coderanch.com

what approcah should be used for this transfer? i tried using bufferedReader,Inputstraem but got problems like either file received contains unwanted characters at start of file is not proper. The file transfer may use a protocol like ftp, http etc.InsputStream and Buffered reader are to read the file. The transfer may happen after the file is read. This decision is part ...

19. File transfer problem    coderanch.com

Hi, I am trying to copy files over the network using a java program. I need to copy files at a certain point of time. How do i handle whenever there is a network interruption. I mean if only few files are copied, how do i revert the transaction & start a new file transfer process again. Plz let me know ...

20. The best way to transfer files    coderanch.com

Cool! Then we'll switch from the most efficient mode (like I was paying you by the hour) to having some fun and getting it done. Have you run through the Sun Networking Tutorial? It's really quite good and should get you sending data back and forth with sockets. Reading and writing that data from files is easy to add on once ...

21. File transfer    coderanch.com

I need to transfer one XML file to other FTP server on same network. Please suggest me best method to do it. I was thinking about sockets but in that case i need to put one programme on server machine also, right ? If right then I dont want to do this. Please suggest some better way. Thanks and Regards, Hemant ...

22. how to Transfer a file/jar to another Computer    coderanch.com

Is it possible to move a jar file to a network system without using client-server technology. I am having a xyz.jar in my system, i want to pass this file to a system in local network. All computers in the network are not shared. Guide me which package, framework i have to work to get it done cheers

23. file transfer    coderanch.com

yes, maybe this is because of network , following are some results(the time is in seconds) 1 MB 2 MB 5 MB 10 MB 50 MB 100 MB 500 MB 4.92 13.45 24.05 57.14 307.59 530.88 2716.98 6.03 11.88 27.86 55.28 299.3 530.89 2603.73 4.78 11.66 37.03 51.77 298.45 542.5 2721.81 4.51 12.31 27.02 50.27 276.08 525.53 2727.56 5.3 10.7 28.92 ...

24. check if file creation or transfer is complete    coderanch.com

Hi there, I wanted to check if there is a way to figure out a file inside a directory is complete and not partial i.e in the process of being generated. There is an external process which transfers the file to a certain directory. Another process periodically checks the directory for files and reads it when it finds a new one. ...

25. P2P file transfer    go4expert.com

Hi, Im looking for a simple program that performs the following tasks: -P2P to be DECENTRALIZED ( no server) -It has to be implemented using a DHT, such as KADemlia or CHORD -Search feature, that will allow you to search the files shared by others using the DHT algorithm. So the DHT will be used for the search. - it can ...

26. File Transfer using java.IO    java-forums.org

Hi all, I have been trying to transfer the file from one server to another using java code. Using the api in the java.IO and the code from the following site First i shared the folder to be transfered, then at the receiving end, i map the network drive.. Using the code as in the site, i can transfer the file ...

27. What is the best machanism to transfer files in a WAN    java-forums.org

Ha! Well, I have had good luck with straight TCP. If you're talking file transfer that is. Its easy to write a client/server combo that will allow file transfer like this, and it is fast (as fast as your connection assuming you use large buffers). If you mean for communication, then RMI is great, although a little complicated for basic use. ...

28. file transfer protocol over LAN    forums.oracle.com

Hello every wizards of this world...i extemely need ur help...plz...can i ask for ur helping hands to give us a running codes for file transfer. on socket programming over LAN(local area network)..we nid this codes for our project...we find hard searching for it on the internet...there are lots of examples but it doesn't work...

29. Speed of file transfer    forums.oracle.com

30. plzz help in transfer of data read from file    forums.oracle.com

sry but couldnt find the "passing the contents to a method in the form of a String." where??? also i tried to get the print output of bis and dis they come out like this: bis: java.io.BufferedInputStream@b8f82d dis: java.io.BufferedReader@1ad77a7 and jverd i'll make sure that i dont use words like "plzz" next time Message was edited by: noobs_will_rule

31. troubles with file transfer code    forums.oracle.com

Socket socket = null; int length = 1024, check; byte b[] = new byte[length]; FileInputStream f1 = null; OutputStream out = null; try { out = socket.getOutputStream(); f1 = new FileInputStream("C:/IPC.LOG"); socket = new Socket("127.0.0.1", 22044); while((check = f1.read(b))>0) { out.write(b); } } Socket client = null; ServerSocket server ...

32. File Transfer in intranet in java    forums.oracle.com

welcome to the forums. Since you are new I can understand that you don't know exactly how to ask a question, so let me give you a few hints 1) this is a forum for programming problems. You do not ask for code, you write code, get stuck and ask for help. People are not going to do your work for ...

33. Transfer a file in Java    forums.oracle.com

Hi My requirement is to write a code where I can transfer a file from client machine (when he selects browse button and ok) to server (where application is hosted). In other words, I have to get a file from client. Now, I dont' have to first read contents of file in java and then create a new file in server, ...

34. File transfer via two IM clients    forums.oracle.com

1.) No one is going through all that code. It's too much for such a problem. Try to produce a [SSCCE|http://sscce.org] that demonstrates the problem. In that process you might even find the problem yourself. Even if you don't, we'll have a much easier time helping you. 2.) You really shouldn't mix UI code and network code like that. Ideally you'd ...

36. file transfer over wireless    forums.oracle.com

public void run() { try{ String msg = inFromClient.readLine(); String[] clientDetails = msg.split(",", -2); System.out.println("inside fileServer run2222" + msg + " client is: " + clientDetails.length); String prmpt = clientDetails[1] + " wants to send you a file called " + "\" " + clientDetails[2] + "\"." + "Would you like to receieve it?" ; int ans = JOptionPane.showOptionDialog(gui, prmpt, "Accept ...

37. Scheduling in file transfer    forums.oracle.com

Thanks BIJ001. hmm, i using window server 2003, anyone know how to do it? By the way, as i browrse through the api of java, i saw a timer class. There a schedule method, after some exploring of the method, found that it can schedule a task to start at the give date. Does anyone know how to end the task ...

38. java.IO file transfer    forums.oracle.com

Hi all, I have been trying to transfer the file from one server to another using java code. Using the api in the java.IO and the code from the following site http://www.roseindia.net/java/example/java/io/CopyDirectory.shtml First i shared the folder to be transfered, then at the receiving end, i map the network drive.. Using the code as in the site, i can transfer the ...

39. file transfer    forums.oracle.com

Hi, I have two servers in two different locations. Two server's will have their own copy of a file as below \\server1\test.pdf - file size is 350 kb \\server2\test.pdf - file size is 350 kb If I overwrite test.pdf in server1 with a new file test.pdf which is 800 kb in size then the difference bytes alone should get updated in ...

40. How to by pass the physical file generation part and transfer the "zipOut"    forums.oracle.com

private static void createZipFile( String fileName ) throws Exception { BufferedInputStream origin = null; FileOutputStream dest = null; dest = new FileOutputStream(fileName.substring(fileName.lastIndexOf("/")+1, fileName.indexOf("."))+".zip"); ZipOutputStream out = new ZipOutputStream(new BufferedOutputStream(dest)); byte data[] = new byte[BUFFER]; FileInputStream fi = new FileInputStream(fileName); origin = new BufferedInputStream(fi, BUFFER); ZipEntry entry = new ZipEntry(fileName); out.putNextEntry(entry); int count; while((count = origin.read(data, 0, BUFFER)) != -1) { out.write(data, ...

41. File Transfer using CORBA    forums.oracle.com

Hello Friends, I want to pass a file (huge in size more than 100 MB) from server to client using CORBA and then i need to display the file in a TextArea of Client of GUI. For that i used the following in IDL interface FileInterface { typedef sequence Data; Data downloadFile(in string fileName); }; But it is not working fine. ...

42. Problem with file transfer over the net    forums.oracle.com

43. Transfer data to file    forums.oracle.com

44. IM System File Transfer through NAT    forums.oracle.com

Hi, i have operational IM system with server and client and i want to implement file transfer. Not that it was any difficult but i want to make it server independent to relieve it. What i want to is establish direct connection between transferring clients. The problem is, how to deal with guys behind NAT. I have seen many topics here ...

45. Secure file transfer using java    forums.oracle.com

46. Legacy file transfer case study    forums.oracle.com

Hello. I need help finishing the code for implementing the Xmodem file transfer protocol (both send and revceive) via a TCP/IP socket connection on port 23. I have developed a server that accepts a telnet connection and starts waiting to receive a file being sent by the remote term program via Xmodem. ONLY ASCII text files transfer without any problems, whereas ...

47. FILE transfer    forums.oracle.com

Generally, you should use the highest-level protocol available to you that does what you need and which doesn't seem like a clumsy fit (a clumsy fit being the case where you have to add a lot of extra code to make it act like something else). So I'd probably go with HTTP if I could. Though an interesting aspect is the ...

48. How to code a HTTP PUT for file transfer?    forums.oracle.com

try { // print out the port number for user server_socket = new ServerSocket(port); System.out.println("httpServer running on port " + server_socket.getLocalPort()); // server infinite loop while(true) { Socket socket = server_socket.accept(); System.out.println("New connection accepted " + socket.getInetAddress() + ":" + socket.getPort()); // Construct handler to process the HTTP request message. try { httpRequestHandler request = new httpRequestHandler(socket); // Create a new ...

49. Transfer File Java    forums.oracle.com

Well it would be a client connecting to a server, a BluRay Player specifically. So when I do a request, I can have it tell me how me files are in a directory, and then go back to the directory and get the name of each file, and then copy the file from the server to the computer like a download? ...

50. corrupt file after file transfer    forums.oracle.com

51. File transfer through LAN using JAVA    forums.oracle.com

int MAX = 100; int n; String buff; char line[] = new char[MAX]; while( (n = input.read(line,0,MAX)) != -1) { f.write(line,0,n); } f.close(); System.out.print("Recieved file\n"); } public static void transfer_file(String filename,String ip) throws Exception { InetAddress server = InetAddress.getByName(ip); int port = 20000; Socket s = new Socket(server,port); BufferedWriter output = new BufferedWriter(new OutputStreamWriter(s.getOutputStream())); OutputStream out = s.getOutputStream( );

52. File Transfer    forums.oracle.com

Hey, I am trying to send a file over a socket, so far I have split the file into byte[] arrays, and sent them over the PrintWriter (as it had a method for sending byte arrays), my question is, how do I receive them? I was originally writing and reading each byte individually on separate lines with: [code] String received = ...

53. Fastest data/file transfer over LAN    forums.oracle.com

54. File Transfer    forums.oracle.com

Hey, I've written a server-client combo to send files over sockets, but at the moment I've got the server sending the file as a series of strings (of the bytes of the file), and the client putting these bytes back together. There must be a better way of doing this, is there a way of sending a file so I could ...

55. File Transfer using Transferto() function    forums.oracle.com

boolean success=true; FileInputStream fIn; FileOutputStream fOut; FileChannel fIChan, fOChan; long fSize; File dest = new File(destination); if(dest.exists()) dest.delete(); try{ fIn = new FileInputStream(source); fOut = new FileOutputStream(destination); fIChan = fIn.getChannel(); fOChan = fOut.getChannel(); fSize = fIChan.size(); fIChan.transferTo(0,fSize,fOChan); fIChan.close(); fIn.close(); fOChan.close(); fOut.close(); success = dest.exists(); if(success=true) { Thread.sleep(5000); File src = new File(source); success = src.delete(); } } catch (IOException exc){ System.out.println("IOException" ...

56. File Transfer    forums.oracle.com

I'd like to write a program that will automatically transfer files from a linux machine to a windows machine over a LAN every couple of hours... I do not want to install any client software on the linux machine -- only the windows machine. Can someone help me get started? Should I be using a specific network protocol? (SSH, SCP, FTP, ...