HOW TO TRANSFER FILE USING SOCKET

HI....
My project is backup sever
I want to take backup of any number of file and of any size please tell
me solution how i can do this for this i done the zip file of backup.
I done this but i face some problem...
regards
Ahire sharad

ahire, if what you want is to transfer a file over a socket here's an example of a sender. If you need the reciever code too, let me know.
public void run()
          FileInputStream inFile = null;
          try
               Boolean done = false;
               int inByte;
               inFile = new FileInputStream(filename);
               byte[] byteBuffer = new byte[128000];
               while(!done)
                    inByte = inFile.read(byteBuffer, 0, byteBuffer.length);                         
                    if (inByte == -1)
                         done = true;
                    else
                         out.write(byteBuffer, 0, inByte);
               inFile.close();
          catch (Exception e)
               try {inFile.close();}
               catch (Exception ex) {ex.printStackTrace();}
               try{Thread.sleep(10);}catch(Exception ex){}
               JOptionPane.showMessageDialog(null,"Error sending file " + filename + "\nError: " + e.toString(),"Error", JOptionPane.ERROR_MESSAGE);
     }Pd: As I see your english isn't so good... I can help you in spanish or italian too... just let me know. Regards,
Message was edited by:
doy2001

Similar Messages

  • How to Transfer files using socket remote method invocation?

    hello guys,
    i am working on java sockets...and i need to send and receive files though Java RMI. how will i go with it....
    Please do help me in this regard
    Edited by: sandeep_genevsoftech on Apr 4, 2008 4:32 AM

    I am also developing a similar application of file transfer but using sockets in place of RMI.The file gets transfered if i run client and server on same m/c(as localhost),but shows "access denied" if run on different m/c.I suppose some security policies need to be set.Can anybody help?

  • How to transfer files using Oracle Managed File Transfer from Oracle EBS 12.1.3

    Hello,
    I'm looking for ideas to securely transfer files bi-directional between Oracle EBS 12.1.3 to IIS using Oracle Managed File Transfer and SOA.  Any help is greatly appreciated.
    Thanks

    Hi Hussain,
    In the Note 466649.1
    Edited
    I have installed R12.1.1
    Datafiles on installed on local file system /u01/EBS_DATa/*dbf, *.ctl, *.log
    doing non RAC to RAC conversion with ASM option,
    I am using ASM with RAC and created ASM disks (DATA, FRA, CRS) on Shared SAN disks between node1 and node2 which are DATA for CRD (control, redo and Data) files, FRA for archive files, CRS for cluster files while doing RAC instalation,
    now how i move my CRD on local file system /u01/EBS_DATa/*dbf, *.ctl, *.log to shared ASM disk DATA ???????
    Please describe with step wise,
    Thanks in advance.
    Regards,
    Vara
    Edited by: user13409653 on Jan 3, 2012 12:25 AM
    Edited by: user13409653 on Jan 3, 2012 5:10 AM

  • How to transfer file using FTP

    Hi All
    I want to transfer few files from one instrument running WIndows Xp to another PC running on Windows Xp.
    I do have installer LabVIEW 8.2 & also Internet Toolkit on the PC.
    Now do i need to install anything on instrument also from where i need to transfer the files.
    Thanks & Regards,
    Rajan
    Thanks & Regards,
    Rajan

    duplicate post

  • Oracle BAM to monitor transfer of files using sockets

    Hi,
    We have two programs transferring files using sockets. We wanted BAM to monitor the transfer.
    Would you please suggest if this is achievable in BAM , and if so , any pointers to how we may go about implementing it .
    Cheers,
    Anant.

    You could generate success/failure/progress from your utility to JMS or call BAM webservices to populate BAM Data Objects. Reports could be built on top of that.

  • How to transfer files from mac to ipad without using itunes

    how to transfer files from mac to ipad without using itunes ???
    as i want to use my ipad for official use as well...please suggest..

    well to be 100% technical, no you didn't but that aside, it good to know there are ways for people to transfer music into the default apps without iTunes, if they have a need.
    I tend to use 3rd party apps for documents, like your mentioned iExplorer etc, which are handy.
    I see from a search the two "apps" you mentioned are not iOS apps, which I had assumed, SyncPod and FreeSync are apps for your computer, that would explain their access to the default Music/Video apps.
    I had wondered how Apple had allowed iOS apps in the store that could get around the sandboxing in iOS of apps.
    Message was edited by: CGW3

  • How to transfer files like music from mac to ipad? tried it using mac but what happen was opposite!

    how to transfer files like music from mac to ipad? tried it few times but what happen was the opposite.

    If you want to sync your iTunes library on your Mac to your iPad ....
    Connect your iPad to the Mac and launch iTunes. Click on your iPad's name on the left side under the devices heading. Then click on the Music tab - and select the music that you want to transfer. Does your iTunes window look like this - with Sync Music checked and the playlists or albums checked as well like in the photo below?
    When you click on the apps tab do you have Sync Apps checked and all of the apps in the window below checked to sync as well?
    If you select all of the items under the different tabs in iTunes - music, apps, photos. etc. - when you sync - all of the selected content should sync over to the iPad.

  • How to transfer file from ipod touch to i tunes. i have files in my ipod , ut itunes is  new so its telling if u sync the ipod all the files will be replaced but no files in the itunes.. so kindly help me how to transfer the files  from i pod to itunesb

    how to transfer file from ipod touch to i tunes. i have files in my ipod , ut itunes is  new so its telling if u sync the ipod all the files will be replaced but no files in the itunes.. so kindly help me how to transfer the files  from i pod to itunes......

    Some of the information below has subsequently appeared in a document by turingtest2: Recovering your iTunes library from your iPod or iOS device - https://discussions.apple.com/docs/DOC-3991
    Your i-device was not designed for unique storage of your media. It is not a backup device and media transfer was designed for you maintaining a master copy of your media on a computer which is itself properly backed up against loss. Syncing is one way, computer to device, updating the device content to the content on the computer, not updating or restoring content on a computer. The exception is iTunes Store purchased content.
    iTunes Store: Transferring purchases from your iOS device or iPod to a computer - http://support.apple.com/kb/HT1848 - only media purchased from iTunes Store
    For transferring other items from an i-device to a computer you will have to use third party commercial software. Examples (check the web for others; this is not an exhaustive listing, nor do I have any idea if they are any good):
    - Senuti - http://www.fadingred.com/senuti/
    - Phoneview - http://www.ecamm.com/mac/phoneview/
    - MusicRescue - http://www.kennettnet.co.uk/products/musicrescue/
    - Sharepod (free) - http://download.cnet.com/SharePod/3000-2141_4-10794489.html?tag=mncol;2 - Windows
    - Snowfox/iMedia - http://www.mac-videoconverter.com/imedia-transfer-mac.html - Mac & PC
    - iexplorer (free) - http://www.macroplant.com/iexplorer/ - Mac&PC
    - Yamipod (free) - http://www.yamipod.com/main/modules/downloads/ - PC, Linux, Mac [Still updated for use on newer devices? No edits to site since 2010.]
    - 2010 Post by Zevoneer: iPod media recovery options - https://discussions.apple.com/message/11624224 - this is an older post and many of the links are also for old posts, so bear this in mind when reading them.
    Syncing to a "New" Computer or replacing a "crashed" Hard Drive - https://discussions.apple.com/docs/DOC-3141 - dates from 2008 and some outdated information now.
    Copying Content from your iPod to your Computer - The Definitive Guide - http://www.ilounge.com/index.php/articles/comments/copying-music-from-ipod-to-co mputer/ - Information about use in disk mode pertains only to older model iPods.
    Get Your Music Off of Your iPod - http://howto.wired.com/wiki/Get_Your_Music_Off_of_Your_iPod - I am not sure but this may only work with some models and not newer Touch, iPhone, or iPad.
    Additional information here https://discussions.apple.com/message/18324797

  • How to transfer file from application server to presentation server in background?

    Hi Experts,
    How to transfer file from application server to presentation server in background?
    Thanks in advance
    Namita

    Thanks Raman and Challa,
    We want to move file from application server to Shared folder, not on local machine. We checked FM which you guys have provided but those are not able to read file from application server.
    We need this program to run in background so that we can use this in daily process chain.
    Appreciate your inputs on this.
    Thanks,
    Namita

  • How to transfer files from Mac to Mac

    How to transfer files/programs between Mac to Mac

    A41KJ wrote:
    How to transfer files/programs between Mac to Mac
    I have always used Target Disk Mode
    http://support.apple.com/kb/HT1661
    Good Luck
    Pete

  • How to transfer files from windows 7 to macbook pro

    how to transfer files from windows 7 pc to my new macbookpro

    You can use your external hard drive that is used to backup your important data to transfer the data from your PC to your Mac.
    If your Windows 7 PC is a laptop and you live near an Apple store, make an appointment at the Genius bar where they will help you transfer the data you want transferred from your PC to your MBP.

  • How to transfer files from a window PC to iPad3?

    How to transfer files (mainly PDF files) from a window PC to iPad3? I am a new user of iPad, please tell me the basic method.

    You will first need an app on the iPad that supports PDF files - unlike a 'normal' computer the iPad doesn't have a file system, and everything on it has to be associated with an app. Apps that support PDFs include free apps such as Apple's iBooks and the Adobe Reader app.
    For iBooks, you can add the PDFs to your computer's iTunes via File > Add To Library, and they should then go into the Books part of your iTunes library. You can then sync them to the iBooks app on your iPad (which you will need to download from the store and install on the iPad first) by connecting the iPad to your computer and selecting it on the left-hand side of your computer's iTunes, and then using the Books tab on the right-hand side to select and sync those PDFs to it.
    Other PDF apps quite often use the file sharing at the bottom of the device's Apps tab
    If you don't have a copy then you can download the iPad manual from here : http://support.apple.com/manuals/ipad/

  • Send a picture file using sockets

    Hi,
    Could someone please tell me how I can send a picture file using sockets across a TCP/IP network? I have managed to do it by converting the file into a byte array and then sending it but I dont see the data back at the client when I recieve the file. I just see the byte array as having size 0 at client.
    Byte array size is correct at client side.
    //client code
    System.out.println("Authenticating client");
              localServer = InetAddress.getLocalHost();
              AuthConnection = new Socket(localServer,8189);
              out = new PrintWriter(AuthConnection.getOutputStream());
              InputStream is = AuthConnection.getInputStream();
              System.out.println(is.available());
              byte[] store = new byte[is.available()];
              is.read(store);
         ImageIcon image = new ImageIcon(store);
              JLabel background = new JLabel(image);
              background.setBounds(0, 0, image.getIconWidth(), image.getIconHeight());
              getLayeredPane().add(background, new Integer(Integer.MIN_VALUE));
    //extra code here
              catch (UnknownHostException e) {
    System.err.println("Don't know about host: LocalHost");
    System.exit(1);
              catch (IOException e) {
    System.err.println("Couldn't get I/O for "
    + "the connection to: LocalHost");
    System.exit(1);
    //server code
                   DataOutputStream out = new DataOutputStream(incoming.getOutputStream());
                   FileInputStream fin = new FileInputStream("3trees.gif");
                   byte[] b = new byte[fin.available()];
                   int ret = fin.read(b);
                   out.write(b);

    i used OutputStream as
    OutputStream out = incoming.getOutputStream(); and flushed the stream too.
    But I still get the same output on the client side. I tried sending a string and it works , but I cant seem to be able to populate the byte array on the client side. It keeps showing zero. Please advise.
    Thank you.

  • Cannot transfer files using Creative Media Sou

    I cannot Cannot transfer files using from my PC to my Creative Jukebox 0GB using Creative Media Source. Since I installed Windows Media Player 0, it seems that Windows Media Player 0 is the only program enabled to transfer files to my creative Jukebox. I would just go ahead and use Media Player, but Media Player won't let me change my library to one designated music file folder location. Media Player wants to find every copy of the same song on my system and is very difficult to use to transfer the files to my Jukebox device. Is there any fix to make Creative Media Source the preferred (or only) program used to transfer the files from PC to device?

    i am having a similar problem, although i have not downloaded windows media player 0. The creative mediasource software wont let me transfer songs onto my zen touch (20G). i only got the player a couple of days ago and it only has about 400 songs on it so far so there's no problem with the memory. I had problems before where it wouldnt let me upload anything that began with a letter after 's' in the alphabet! i solved this (no idea how) but the problem seems to have come back and now it wont let me up load anything. When i atempt to, it comes up with the prompt "unable to read file. file may be in use, missing or corrupted." (which they arent as far as i know) I also, for some reason, cannot play any songs through creative mediasource - even though i could a few hours ago!
    Please could someone help as this is very frustrating!!!!!!

  • I'am a first time mac user, can any explain to me how to transfer file i.e. iTunes ,pictures, other files.

    I'am a first time mac user, can any explain to me how to transfer file i.e. iTunes ,pictures, other files.

    Select a file you want to transfer and drag it to the desired destination.
    If you need help with the basics of OS X you can:
    Select Mac Help (or Help Center) from the Finder's Help menu and enter a search keyword. For your question you might search for "copy," "file copy," or "drag and drop" for example.
    See Apple - Support - Mac 101
    Visit the Apple website where you will find additional information and tutorials on how to use OS X.

Maybe you are looking for

  • Help with my Bouncing ball?

    Hey guys, I really have the basis of my program working and everything however i just had one question. My Animation works by using the Alarm which uses the take notice method. The takeNotice then calls a move method that updates my ball coordinates.

  • How can I disable .mp4 videos from playing automatically on Yahoo News? (and elsewhere)

    I posted a similar question last week about disabling html5 videos and that seems to have worked. But I notice that when I look at the Yahoo News main page, some videos (thumbnails) are playing automatically as I'm scrolling up and down the page. I f

  • Urgent:BiG Problem with accents.

    Hi, I have a problem with accents in IPlanet 4.0 sp4. I have a form in a html page and a servlet that takes the words that i put in the form. The problem is if i put accents in the word iplanet don' t serve the correct caracters.. Please i need help.

  • Importing movies to purple iMovie from iPhone, iPad, and iPhoto

    I have created movies on my iphone and on a Lumix camera. I am trying to figure out the best way to have all my movies in iMovie rather than iPhoto. I have already likely made the mistake of transfering my Lumix data to an iPad with iOS while I was i

  • So what are you going to do about it?

    What are you going to do about these iPad2 shipping problems, Verizon? Your plastered dates of "3-4 weeks" has passed and we are now in week 5+ with nothing to show for. How is this problem going to be rectified? I'm tired of talking to phone reps th