Binary file transfer using RMI

Thanx in advance !!!
My Query:
Is there any restriction on the maximum size of a binary file that can be transferred over RMI?
In an application (and as per the requirements), I am converting the file contents to a byte array on the client machine and transferring using RMI method calls. At the server side, I am reconstructing the file using the same byte array.
Writing a Java FTP application is out of question.
So please advise.
Vikas

RMI uses TCP/IP so the default should be close to the standard IP limit.

Similar Messages

  • I woke up at 3am to find my MacBook Pro in the middle of a file transfer using AirDrop.

         I woke up at 3am to find my MacBook Pro in the middle of a file transfer using AirDrop. I had not accepted any file transfers via AirDrop as I was asleep so I am a bit confused by all the posts that say that the only way it will work is by the end user accepting a request to transfer files. I am on a home network which has both a soft and hard firewall. I checked my firewall logs and have no signs of intrusion or intrusion attempts. I checked my network map to see see if someone had brute forced my router and was using it but the only assets listed were mine. My router is set up to not be accessable from wireless computers, and is filtered to only allow use by a assets in the MAC Address list. I am an IT by trade but this is my first mac so I am not completely savy in the ways of the ways of macdom. I have found several posts with suggestions on how to turn off and came up with the following terminal command "defaults write com.apple.NetworkBrowser DisableAirDrop -boolean YES". My question is this, how is it possible that my AirDrop was activated and in the middle of a file tranfer if I did not initiate it? I do have a MacMini on my network but its WiFi is turned off so the transfer was not with it. I have read on different posts that you cannot AirDrop if the computer is not on the same network but there were no foreign assets on my network. So my question is this
    1. If AirDrop can not be used with another computer if it is not on the same network, how was it being used?
    2. How can AirDrop be used to xfer files if I did not accept or initate it?
         It seems to be a pretty big security hole to me. Any suggestions or help would be greatly appreciated.
    Ethan

    It could just be a bad disc - I use Verbatim and have only had one fail in a ten-year time period. Try getting a batch of Verbatims and see if you have any problems. I didn't even know that there were Kodak branded discs...
    Clinton

  • HT204144 File transfer using Airdrop from iphone to Macbook Pro

    File transfer using airdrop form Macbook Pro to iphone is working...but from iphone to Macbook Pro is not working, Why?

    Hi Brok25;
    Thanks for the question.  The resource below explains the specs and settings that are needed for AirDrop.  Check the settings and look to see if your MacBook Pro is listed.
    Mac Basics: AirDrop lets you send files from your Mac to nearby Macs and iOS devices - Apple Support
    http://support.apple.com/en-us/HT203106
    Sending files to and from an older Mac
    If a Mac you're using with AirDrop was manufactured before 2012, you can send and receive files with other Mac computers.
    On the sending Mac, click "Don't see who you're looking for" in the AirDrop window.
    Select the option to "Search for an Older Mac."
    On the receiving Mac, open a new Finder window and click AirDrop in the sidebar.
    Tips for sending files
    Make sure Wi-Fi and Bluetooth are enabled on your Mac and your iOS device. Although you don't have to connect to a specific network, Wi-Fi needs to be on to send and receive files using AirDrop.
    Move your devices closer together. AirDrop is designed to work within a range of approximately 30 feet (9 meters). If you need to send a file to someone farther away, consider using File Sharing, iCloud, or email instead.
    If you're using a firewall on your Mac, you won't be able to receive AirDrop files if you have enabled "Block all incoming connections" in the Security & Privacy pane of System Preferences.
    Make sure your devices meet system requirements for AirDrop.
    System Requirements
    To see if your Mac works with AirDrop, make sure you’re in the Finder by clicking the desktop (the background area of your screen), or by clicking the Finder icon in the Dock. Then, check to see if AirDrop is listed as an option in the Go menu. If you don't see AirDrop listed, your Mac doesn't support this feature.
    In order to transfer files between a Mac and and an iPhone, iPad or iPod touch
    your iOS device needs to include a lightning connector 
    your iOS device needs iOS 7 or later installed
    your Mac needs to be a 2012 or later model with OS X Yosemite installed
    Your Mac and iOS device both need bluetooth and Wi-Fi turned on. You do not have to be connected to a specific Wi-Fi network. 
    To transfer files between two Mac computers, you need the Mac models listed below with Wi-Fi turned on and OS X Lion or later installed.
    MacBook Pro (Late 2008 or newer)*
    MacBook Air (Late 2010 or newer)
    MacBook (Late 2008 or newer)*
    iMac (Early 2009 or newer)
    Mac Mini (Mid 2010 or newer)
    Mac Pro (Early 2009 with AirPort Extreme card, or Mid 2010)
    *The MacBook Pro (17-Inch Late 2008) and the white MacBook (Late 2008) do not support AirDrop.
    For help identifying your Mac, choose About This Mac from the Apple menu. You can refer to the Apple Support website to find out if your iPhone, iPad or iPod Touch includes a lightning connector. 
    Cheers,
    - Judy

  • File transfer using tcp that  implements in swing

    Can anybody send me the file transfer using tcp that implements in swing codes

    I'm assuming that you're inputing a plain ASCII text SQL file. It's easier to use Readers if you're dealing with plain text, the Output and Input Streams are for Byte input and output. So:
    BufferedReader myReader = new BufferedReader(new FileReader("myFile.sql"));
    BufferedWriter myWriter = new BufferedWriter(new InputStreamWriter(mySocket.getInputStream()));
    String inString;
    while((inString = myReader.readLine()) != null)
    myServerWriter.write(inString);
    myServerWriter.writeLine();
    myServerWriter.flush();
    Then, in the server you can use the same method that I'm using for the Buffered Reader to read in the file, and use a BufferedWriter wraped around a FileWriter to output the text to that file. Bravo.
    -Jason Thomas.

  • Binary File Transfer

    Hi Experts,
         i need to know how to transfer Binary files from application server to presentation server...
         does it have  any function module???
         i hav use this Function Module 'DX_FILE_COPY'...
          but it transfers only normal ".txt" files......
    Thanks,
    kassim

    Hi,
    I have searched the net and found something interesting that i think might solve your problem:
    FM 'C13Z_APPL_TO_FRONT_END ' if present downloads binary files from the application server to the presentations server. It will show you a popup (which file to download and where to put it, including
    the type of file) and when you click on the download button it will call function module C13Z_FILE_DOWNLOAD_BINARY, this will call (in the end) WS_DOWNLOAD.
    FM 'C13Z_FILE_DOWNLOAD_BINARY' can show you how to write your own function, replacing WS_DOWNLOD with GUI_DOWNLOAD as WS_DOWNLOAD is obselete.
    FM LIKE:
    C13Z_FILE_DOWNLOAD_ASCII - Downloads a file in ASCII format
    C13Z_FILE_DOWNLOAD_BINARY - Downloads a file in binary format
    C13Z_FILE_UPLOAD_ASCII - Uploads a file in ASCII format
    C13Z_FILE_UPLOAD_BINARY - Uploads a file in binary format \
    I think above FM will definetly useful for you.
    Pooja

  • Data loss in the secure file transfer using java

    Hi,
    My java Appllication uses the sftp(secure file transfer protocol) for file transferring. when the load is high like 150 GB , data loss occuring for some files especially last chunk of data is missing.
    Core file transfer code
    while (true)
    int read = bis.read(buffer); //Reading bytes into the byte array (buffer) from network stream (bis).
    if (read==-1) {
    break; //Break the loop, if there are no more bytes available in the InputStream.
    bos.write(buffer,0,read); //Writing the same number of bytes what we read into buffer byte array into OutputStream
    complete.update(buffer,0,read); //Giving the same number of bytes what we read above to the checksum calculation.
    bytesSoFar += read; //Incrementing the bytes that we have read from the source.
    //if the bytes transferred are equal to the source file size
    If (bytesSoFar == fileInfo.getFileSize().intValue())
    // Calculate the file checksum.
    // Update DbAuditLog with checksum and no. of bytes read
    else
    // Update DbAuditLog with no. of bytes read
    bos.flush();
    Please help , why the data loss is happening when the big size files transfer
    Note:
    1.150 gb not a single file multiple files.
    2.SFTP no java specific API, So connection is happening through java .io.sockect connection

    so, if you are not getting any exceptions, yet the data is incorrect, it sounds like you are having actual network issues. i'd start looking at things like the actual network cards in the computer as well other equipment involved in the transfer. since you are not getting exceptions, the network stack obviously thinks nothing was lost over the wire, so either the actual hardware has issues, or the network stack, or the issue is on the sending end. the last possibility is that the client is somehow munging the data it is sending. do you control the client code? if so, i'd start checking the client side code for bugs (and/or post it here).
    also, i'm assuming that all of the variables included in your original code are thread local (you aren't sharing any of those buffers/streams/etc between multiple threads).

  • BINARY FILE loading using ODI

    Hi ,
    is it possible to load a binary file using  ODI ?
    Basically i'm looking for file to table and file to file conversion .
    Regards.

    DBMS_LOB.LOADBLOBFROMFILE (
      dest_lob IN OUT NOCOPY BLOB,
      src_bfile IN BFILE,
      amount IN INTEGER,
      dest_offset IN OUT INTEGER,
      src_offset IN OUT INTEGER);
    you can specify the src. Also, you can ftp the file using ODI sftp tool and then load.
    There are other ways to load as well,
    1. Sql loader aslo supports loading BLOBs. Odi has got IKM Sql loader however I have never tried with BLOB and need to check if it supports. The below link might be helpful,
         ORACLE-BASE - Loading LOB Data Using SQL*Loader
    2. External tables could be used.
    3. Java program could be called in ODI proc.

  • File to file transfer using UDF

    Hi
      i am doing one scenario,file tofile transfer using UDF.
    I will write one UDF which will read the whole content from text file and write to the target path.Ok.so i am mentioning both sender and reciver URL in UDF.is this the correct way.
    then if am writing URL in UDF then is it again need to create  communication channel for both.
    and how i will do mapping  using UDF..plz let me know  weather my concept is correct or not

    Hi,
    You can do this with out UDF and through File--File Simple Scenario
    What is your Typical requirement to use the UDF here.
    If there is no Specific UDF Requirement means , we can follow Normal Scenario to pick the file from One place and to place it at another folder
    File to File scenario:
    Introduction to simple(File-XI-File)scenario and complete walk through for starters(Part1) - File to File Part 1
    Introduction to simple (File-XI-File)scenario and complete walk through for starters(Part2) - File to File Part 2
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/xi/flatFILETOFLATFILE&
    REgards
    Seshagiri

  • Plz hel for file transfer using zmodem protocol

    someoe plz help me. i have to devlop an application that transfers files betwn 2 pcs(both ways) using dial up connection, further it should autodial the connection at periodic times.
    i am trying to use Zmodem file transfer protocol. i succseed in sending string (for test)using my sender program with hyper terminal open on the other hand. it prints the string. but when i use my receive program, similar to given in samples(simpleread.java) it doesnt work.
    actually when the ring comes from the sender how to send command to modem to hang up and connect to the calling pc if there are any such commands then plz help.
                                  ----sameer

    someoe plz help me. i have to devlop an application
    that transfers files betwn 2 pcs(both ways) using dial
    up connection, further it should autodial the
    connection at periodic times.
    i am trying to use Zmodem file transfer protocol. i
    succseed in sending string (for test)using my sender
    program with hyper terminal open on the other hand. it
    prints the string. but when i use my receive program,
    similar to given in samples(simpleread.java) it doesnt
    work.
    actually when the ring comes from the sender how to
    send command to modem to hang up and connect to the
    calling pc if there are any such commands then plz
    help.
    ----sameerU ddnt abrvt nuf. I r3r1t 4 U.
    Sum1 plzz hep m3. i 1/2 2 dvlop app taht xfer fil betwn 2 pcs(bth wys)...

  • Flat file(Binary file) upload using GUI_UPLOAD

    I had uploaded a Binary file Using GUI_UPLOAD , File type was 'BIN'.
    but the data i got in Internal Table was in 0's and 1's.
    whereas i tried the same thing on a different server but  the same Version it gave me the data as text in Internal Table.
    what could be reason..or wat could be done to resolve this.

    Did you declare the internal table used to upload the binary file as TYPE X ?
    begin of itab,
      raw(255) type x,
    end of itab occurs 0.
    CALL FUNCTION 'GUI_UPLOAD'
       exporting
          filetype =  'BIN'
          filename = 'C:DOWNLOAD.BIN'
       tables
          data_tab = itab.
    Always remember to reward snippets you find useful!

  • File transfer using non-blocking sockets - data mysteriously  vanish

    Hello,
    I need to pass some big amount of data using sockets. I my appliaction I have noticed that sometimes I didn't get all bytes. To check it out I wrote simple client + server to figure out what is happening. So:
    - I have a sender and receiver application
    - I'm trying to transfer 5MB text file.
    - On receiver side, output file is never larget than 3MB
    - If I put some timeout on sender side (1ms timeout between write operations) everything works fine.
    Could someone tell me what I do wrong? Why data disappears and when? The same file transfered using old sockets goes always fine...
    Thanks in advance!
    Here is complete source for receiver and sender:
    RECEIVER:
    import java.io.FileOutputStream;
    import java.net.InetSocketAddress;
    import java.nio.ByteBuffer;
    import java.nio.channels.SelectionKey;
    import java.nio.channels.Selector;
    import java.nio.channels.ServerSocketChannel;
    import java.nio.channels.SocketChannel;
    import java.util.Iterator;
    public class ReceiverA {
          * @param args
         public static void main(String[] args) {
              String outputFile = "c:\\outputA.txt", host = "127.0.0.1";          
              int port = 8001, bufferSize = 10240;
              try {
                   ByteBuffer buffer = ByteBuffer.allocate(bufferSize);
                   Selector selector = Selector.open();
                   ServerSocketChannel server = ServerSocketChannel.open();
                   server.configureBlocking(false);
                   server.socket().bind(new InetSocketAddress(host, port));
                   server.register(selector, SelectionKey.OP_ACCEPT);
                   System.out.println("Server started");
                   while(true)
                        selector.select();
                        Iterator<SelectionKey> iterator = selector.selectedKeys().iterator();
                        while (iterator.hasNext()) {
                             SelectionKey key = (SelectionKey) iterator.next();
                             iterator.remove();
                             if (key.isAcceptable()) {                              
                                  SocketChannel client = server.accept();
                                  client.configureBlocking(false);
                                  client.register(selector, SelectionKey.OP_READ);                              
                                  continue;
                             SocketChannel channel = (SocketChannel) key.channel();
                             int counter = 1;
                             if ( key.isReadable() ) {
                                  FileOutputStream os = new FileOutputStream(outputFile);
                                  int res;
                                  do
                                       buffer.clear();
                                       res = channel.read(buffer);
                                       counter += res;
                                       System.out.println(res);
                                       buffer.flip();
                                       os.write(buffer.array(), 0, buffer.limit());
                                  while( res >= 0 );          
                                  channel.close();
                                  os.close();          
                                  System.out.println("Receiver: " + counter);
                                  return;
              } catch (Exception e) {
                   e.printStackTrace();
    }SENDER:
    import java.io.FileInputStream;
    import java.io.IOException;
    import java.net.InetSocketAddress;
    import java.nio.ByteBuffer;
    import java.nio.channels.SelectionKey;
    import java.nio.channels.Selector;
    import java.nio.channels.SocketChannel;
    import java.util.Iterator;
    public class SenderA {
         public static void main(String[] args) {
              String inputFile = "c:\\inputA.txt" , host = "127.0.0.1";          
              int port = 8001, bufferSize = 10240;
              try {
                   ByteBuffer buffer = ByteBuffer.allocate(bufferSize);
                   byte[] byteArr = new byte[buffer.capacity()];
                   Selector selector = Selector.open();
                   SocketChannel connectionClient = SocketChannel.open();     
                   connectionClient.configureBlocking(false);
                   connectionClient.connect(new InetSocketAddress(host, port));
                   connectionClient.register(selector, SelectionKey.OP_CONNECT);
                   while(true) {
                        selector.select();
                        Iterator<SelectionKey> iterator = selector.selectedKeys()
                                  .iterator();
                        while (iterator.hasNext()) {
                             SelectionKey key = (SelectionKey) iterator.next();
                             iterator.remove();
                             SocketChannel client = (SocketChannel) key.channel();
                             if (key.isConnectable()) {
                                  if (client.isConnectionPending()) {
                                       System.out.println("Trying to finish connection");
                                       try {
                                            client.finishConnect();
                                       } catch (IOException e) {
                                            e.printStackTrace();
                                  client.register(selector, SelectionKey.OP_WRITE);
                                  continue;
                             if(key.isWritable()) {
                                  FileInputStream is = new FileInputStream(inputFile);
                                  int res;
                                  int counter = 0;
                                  do
                                       buffer.clear();
                                       res = is.read(byteArr, 0, byteArr.length);                                   
                                       System.out.println(res);
                                       if ( res == -1 ) break;
                                       counter += res;
                                       buffer.put(byteArr, 0, Math.min(res, buffer.limit()));
                                       buffer.flip();
                                       client.write(buffer);
                                        * When I remove comment file transfer goes OK!
                                       //Thread.sleep(1);
                                  while( res != -1 );          
                                  client.close();
                                  is.close();          
                                  System.out.println("Receiver: " + counter);
                                  return;
              catch(Exception e) {
                   e.printStackTrace();
    }

    There are at least two problems here.
    A. In the receiver you should test for -1 from the read() immediately, rather than continue with the loop and try to write -1 bytes to the file.
    B. In the sender you are ignoring the return value of client.write(), which can be anything from 0 to the buffer length. If you get 0 you should wait for another OP_WRITE to trigger; if you get a 'short write' you need to retry it until you've got nothing left to write from the current buffer, before you read any more data. This is where the data is vanishing.

  • File transfer using internet tool kit

    HI 
    i just need to do simple file transfer between 02 pcs connected over a network ....... i am using the internet toolkit .... i have seen the shipped example FTP browser.vi but i am not quite sure how to work with it .
    consider that i have only to pc's one with ip add 192.168.0.1 and other with 192.167.0.2.... and i want to transfer a file form one to another or vice-versa.....
    Also i came across that to use ftp vi's i should have guideftp(ftp server) installed on my pc (http://zone.ni.com/devzone/cda/tut/p/id/3534). what the purpose of using this server??
    and how can i achieve the simple task of sending a file from one pc to the other using labview?
    regards  
    Regards

    nolsqn wrote:
    Also if someone can explain me how to use the guideftp (ftp server ) with the internet toolkit ?
    thanks 
    The FTP VIs in the internet toolkit implement a FTP client. The FTP protocol is a client/server protocol. In order to use the FTP VIs there needs to be a FTP server for it to connect to. That is the purpose that the guideftp tool you mention is providing.
    Mark Yedinak
    "Does anyone know where the love of God goes when the waves turn the minutes to hours?"
    Wreck of the Edmund Fitzgerald - Gordon Lightfoot

  • File transfer using WIFI

    When I'm connected to my PC for WIFI file transfer. The program does not MAP to my hard drive

    Make sure AP isolation on router is Off
    Also you need file andwireless sharing enabled in PB settings  Storage and Sharing. 
    Then go to settings,  wifi, and ? info icon, then Internet Connection dropdown to get PB ip address...
    192.168.xxx.xxx
    Map drive in My Computer to \\192.168.xxx.xxx\media
    That should be all you need to do.

  • Need hlep for PGP Encryption for delimited file transfer using B2b

    I have a requirement to read the PGP encrypted delimited file from partner and decrypt it to process. Can any body tell me how can I do this in b2b. I really appreciate the help

    Better read it as a binary document and pass it to the back-end for further processing (decryption and processing). If you want to the decryption at B2B layer itself then use the java callout feature -
    http://docs.oracle.com/cd/E23943_01/user.1111/e10229/callouts.htm#CHDEFBDG
    Regards,
    Anuj

  • Canon Raw File Transfer using Canon 7D / Lion / Aperture 3.2

    Is anyone finding issues in unloading raw files with a Canon camera and the latest software?  I have been doing this successfully for some time using Aperture 3.1 with Snow Leopard.  I use a 13" MBP with 8GB of memory and a huge hard drive.  I upgraded to Lion and Aperture 3.2 and find that my Canon 7D doesn't transfer all of my pictures off of the camera.  The camera is connected via the USB cable that plugs directly into the camera.  I have found a workaround by re-importing off the camera and selecting the option to not download previously imported pictures.  Depending on the number of photos, I may have to do it up to 10 times to get all the pictures.  I have the latest Canon 7D firmware.  I'm able to successfully do this using Canon Utilities running on Lion.  Ironically, this same issue happens when I import into Aperture from the camera or from the hard drive.  After importing onto my hard drive using Canon software and getting all the pictures in one try, I then tried to import from the hard drive into Aperture but faced the same issue.  I think I have this isolated to an Aperture 3.2 issue with Lion and Canon 7D raw images.  I also thought that it might be due to lack of battery life on the camera or with large photo shoots.  Nope.  It happens as well with a small number of photos and a healthy battery.
      Is anyone else running into this issue?  Thanks.

    The Digital Camera RAW Compatibility Update 3.9:
    http://support.apple.com/kb/DL1473
    supports Powershot S100, try to download and install this update.
    Regards
    Léonie

Maybe you are looking for

  • Unable to check send workout data in itunes to setup account

    after setup my nikeplus account the automatic send workout data box in itunes will not be selected to enter my account details. does anyone know who to resove this problem.

  • Eed=off in kernel and unable to get my hp printer to work

    ok so im having some trouble with 2 things. the eed=off thing during the kernel booting isnt as much of a problem as it is an annoyance. im more or less having major issues with trying to set up my hp photosmart printer. ive followed the wiki page fo

  • IDVD selectively won't recognize .mp4 format - how to burn for dvd player?

    Hi - I'm trying to burn a .mp4 movie for my gf's family so they can watch it on their TV instead of my tiny comp. After trying DiskUtility and iTunes (both to no avail, DU wouldn't even allow me to select a .mp4 format to burn on the DVD; iTunes burn

  • Monitor an instance's changes

    Hello, all information that I need to monitor with a unit monitor is included in the properties of its target instance. The monitor must react to changes of the properties of its target instances (as they change during discoveries). Such as, if one o

  • Forum engine might be broken.

    Forum engine might be broken. I tried to post here: http://forums.lenovo.com/t5/Windows-7-Discussion/X61-Bluetooth-device-is-not-detected-in-Windows-7-6... It said: Correct the highlighted errors and try again. - And there was nothing highlighted to