HELP - about sending files

how can i transfer someone files as files and not as junk data in a packet if i have access to the output stream[i can write whatever i want to the packet i'm sending you] of the packets i send someone?

how can i transfer someone files as files and not as
junk data in a packet if i have access to the output
stream[i can write whatever i want to the packet i'm
sending you] of the packets i send someone?Technically, anytime you send ANY data (files or otherwise) over a network, it's junk in packets..
File f=new File("/path/to/file");
FileInputStream fis=new FileInputStream(f);
OutputStream os=(your outputstream)
boolean going=true;
try{
   while (going){
      os.write(fis.read());
}catch(Exception ex){
   going=false;
}Use a buffer if youre dealing with large files..

Similar Messages

  • Need Help in Sender File Content Conversion

    Hi All,
    I request your expert advice on Sender File content Conversion. I need to process the below pasted file. I was able to achieve this by keeping a offset of 6 in Sender PI File Adapter (PI 7.1) to ignore first 6 lines and used a Unix script to remove last line"END OF REPORT".
    Now my new requirement is I need to capture the date "DECEMBER 2009" from line 3. How can I do this. I have set offset as 6 so Adapter will start processing from line 7. If I don't set offset Interface fails. Please suggest. Thank you.
    ABC LAB            XYZ LIMITED"
                       TRIAL BALANCE"
                       FOR THE PERIOD ENDED DECEMBER 2009"
    "TEST Bank","101000",-1589365.58,0.00,738295.08,0.00
    "TEST Bank Clearing A/c","101200",0.00,0.00,14848018.55,0.00
    "TEST Bank Sweeps","101250",104315957.19,0.00,7571985482.08,0.00
    "TEST Receipts","101260",0.00,0.00,19788596.15,0.00
    "TEST Corporate Deposits","101270",-7776629.87,0.00,-135914980.50,0.00
    "SHARES","00SH",0.00,0.00,-7869890086.22,0.00
    "END OF REPORT"

    Dear Phani,
    Please go through the below blogs:
    File content conversion sites
    /people/venkat.donela/blog/2005/03/02/introduction-to-simplefile-xi-filescenario-and-complete-walk-through-for-starterspart1
    /people/venkat.donela/blog/2005/03/03/introduction-to-simple-file-xi-filescenario-and-complete-walk-through-for-starterspart2
    /people/arpit.seth/blog/2005/06/02/file-receiver-with-content-conversion
    /people/anish.abraham2/blog/2005/06/08/content-conversion-patternrandom-content-in-input-file
    /people/shabarish.vijayakumar/blog/2005/08/17/nab-the-tab-file-adapter
    /people/venkat.donela/blog/2005/03/02/introduction-to-simplefile-xi-filescenario-and-complete-walk-through-for-starterspart1
    /people/venkat.donela/blog/2005/03/03/introduction-to-simple-file-xi-filescenario-and-complete-walk-through-for-starterspart2
    /people/venkat.donela/blog/2005/06/08/how-to-send-a-flat-file-with-various-field-lengths-and-variable-substructures-to-xi-30
    /people/anish.abraham2/blog/2005/06/08/content-conversion-patternrandom-content-in-input-file
    /people/shabarish.vijayakumar/blog/2005/08/17/nab-the-tab-file-adapter
    /people/jeyakumar.muthu2/blog/2005/11/29/file-content-conversion-for-unequal-number-of-columns
    /people/shabarish.vijayakumar/blog/2006/02/27/content-conversion-the-key-field-problem
    /people/michal.krawczyk2/blog/2004/12/15/how-to-send-a-flat-file-with-fixed-lengths-to-xi-30-using-a-central-file-adapter
    /people/arpit.seth/blog/2005/06/02/file-receiver-with-content-conversion
    http://help.sap.com/saphelp_nw04/helpdata/en/d2/bab440c97f3716e10000000a155106/content.htm
    Please see the below links for file content conversion..
    /people/michal.krawczyk2/blog/2004/12/15/how-to-send-a-flat-file-with-fixed-lengths-to-xi-30-using-a-central-file-adapter - FCC
    /people/michal.krawczyk2/blog/2004/12/15/how-to-send-a-flat-file-with-fixed-lengths-to-xi-30-using-a-central-file-adapter - FCC
    File Content Conversion for Unequal Number of Columns
    /people/jeyakumar.muthu2/blog/2005/11/29/file-content-conversion-for-unequal-number-of-columns - FCC
    Thanks,
    Satya

  • Help me send files from my Mac to my BlackBerry

    Friends:
    I'm trying to send files to my BlackBerry via BlueTooth with no luck. I attempt to initiate receiving the files from my BlackBerry prior to sending it from my Mac, but I get the following error:
    "File Transfer Connection Failed" (the file doesn't even begin to transfer)
    Oddly enough I can send files from the BlackBerry via BlueTooth easily.
    Sharing via BlueTooth is enabled on the Mac.
    In manage connections, the the BlueTooth is ON but it has a little dash next
    to the checkbox, not a green check mark like Wi-Fi and the Mobile Network do.
    Thanks for your ideas!
    Migs

    http://discussions.apple.com/forum.jspa?forumID=1003
    http://www.howardforums.com/
    I've found the easiest way on leopard(or panther & Tiger) is to use my ISP's web mail, and bear in mind I am using an LG phone and Verizon, to sent a message and attachment to my phone by To: [email protected] and then it comes to cell phone. I don't know if your carrier has such a # to send data like verizon does. Probably does. Depending on what machine and OS X I'm using, it all seems to work different. There are modem scripts in /Library/Modem\ Scripts for usage. But then Leopard Syspref seems to have a different style to setup those modems. Bluetooth is about like a chain saw. Tough, at best to start, sometimes.

  • Help About Rex File No work in Logic !!!

    am use Logic 7.2.1
    The Rex File No Work In My Logic The Msg Problem ( What Kind Of File Is This)!!!!
    please help what i can do.
    Thank You.
    2.0   Mac OS X (10.4.6)   Logic 7.2.1

    Help About Rex File No work in Logic !!!
    am use Logic 7.2.1
    The Rex File No Work In My Logic The Msg Problem ( What Kind Of File Is This)!!!!
    please help what i can do.
    Thank You.

  • Need help about sending back xml to MIDlet from servlet

    Hi all,
    I need an example (or maybe some links or tutorials) about
    using servlet as the resource files for kXML parsing in J2ME.
    Can somebody help me ?
    Actually, I want to know how servlet generate xml and send it back
    to the client (MIDlet). My recent plan is to use MySQL as the database
    so the servlets will try to fetch the table and convert it into xml document.
    Oh yeah... I've been using kXML as parser in my MIDlet (it works).
    Thank you
    Best Regards,
    CHi

    Hi,
    the job is not a thread, but it is process running on AS400 which returns a stauts when i use getStatus()
    so i want to keep checking for getStatus() untill the job is done, that is poll for status
    I will try to add Thread.sleep() but what will my class look like
    here is the code i have working, how can i modify it
    public class CallJobInBatch
    //logic for calling the program goes here
    Job myJob = new Job(as400, jobNumber, jobUser, newJobNum);
      while (!jobStatus.equals("*ACTIVE"))
            myJob = new Job(as400, jobNumber, jobUser, newJobNum);
            jobStatus = myJob.getStatus();
    }Ashish

  • Hi Question about Sender File Content Conversion

    Hi All,
    I have a flat file i need convert that flat file to the below XML format using File content Conversion, can anybody help me on this with example File content Convertion parameters
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:MT_FileSend xmlns:ns0="http://test">
       <Recordset>
          <Contact>
             <Name>ABC</Name>
             <Number>123</Number>
             <Address>
                <HouseNumber>246789</HouseNumber>
                <StreetNumber>100</StreetNumber>
                <Phone>
                   <Mobile>90000000</Mobile>
                   <LandLine>12345678</LandLine>
                </Phone>
             </Address>
             <Email>
                <Office></Office>
                <Personal></Personal>
             </Email>
          </Contact>
       </Recordset>
    </ns0:MT_FileSend>

    Hi Sudheer reddy,
            Good question.
    File content conversion parameters are:
    1) Doccument Name: Doccument name is nothing but message type name for file side: MT_FileSend
    2) Doccument Namespace: mention the name space for the message type.
    3) Doccument Offset: for which row and which coloumn doccument has to be write.
    4) recordset name: mention the record set name: Recordset
    5) Recordset Namespace: if the namespace is different for message type name space mention name space or otherwise it is blank.
    6) Recordset Structure: Mention the structure name
    7) Recordset Sequence: mention the sequence of the recordset Ascending or Decending
    8) Recordset permessage: Would define no of record sets per message.
    9) Key-field name: to query to the doccument
    10) Key field type: string(Case-senstive)
    fieldValues
    fieldSeparator
    endSeparator
    Note: pls check in SDN about file content conversions it so many blogs are available, u can easily understand.
    Regards,
    Sateesh

  • Help about importing files and fullscreen mode

    Hi,
    sorry but i'm kinda new about this. I'm creating a kiosk for my company which uses a touchscreen PC like what you see in the malls right now i.e directory. Im using flash cs5 and AS3. My problem is when I imported video / swf file in my stage (which is in full screen when loaded in projector), the video / swf file automatically change to full screen also. What I like to do is even if my window is in full screen mode, the video will still be the same what I set it to be. For you to imagine what im doing is in my homepage, my buttons would be video/swf files placed side by side. Once I click on one video it will go to another scene just like a website. I tried to google about this but no luck, all i find is how to import. These are the codes i used to load my project in fullscreen mode automatically.
    var main:Stage = this.stage;
    main.scaleMode = StageScaleMode.NO_SCALE;
    main.scaleMode = StageScaleMode.EXACT_FIT;
    main.align = StageAlign.TOP;
    main.displayState = StageDisplayState.FULL_SCREEN;
    Hope you can help me on this. Thanks in advance for those who will help.
    Thank you
    -Arjae

    thanks andrei. but it still doesn't solve my problem.
    var main:Stage = this.stage;
    main.scaleMode = StageScaleMode.NO_SCALE;
    //main.scaleMode = StageScaleMode.EXACT_FIT;
    main.align = StageAlign.TOP;
    main.displayState = StageDisplayState.FULL_SCREEN;
    as u have said, i remove scale_fit line but still in full screen. when I run s swf file the video automatically converted to full screen. what i only want to make full screen is the stage where the video is located. is there some command i need to do on this? I tried to use this using AS2 and its ok, the video didn't go full screen even the stage itself is in fullscreen. but i really want to use AS3 because of some features. If you can help, it will be great. Thanks lot!

  • General Q about sending files

    I have been converting my excel files over to PDF's I would like to store these files on my companies servers.  I am running into several issues when I go to send these files for others to complete, here is my path: Forms>Distribute Forms> then I choose my method.  The question that I have is why does adobe then create additional folders, PDF's for the responses?  Can I change the folder to where these responses are sent to?  I do not want them mixed in with our company form folders it would be confusing for anyone trying to find and send out a form.
    My second question is if I have to send one form to 5 differnt people and they each need to fill in a section and sign there names, how do I go about doing this.  What happens when we run a test the one form that I send out comes back as 5 forms that are not collaborated together.
    Thanks

    Pretty sure your question is one about Designer, not Acrobat. In such a case, try the LiveCycle forum.

  • Need help about jar file again!!

    I want to make some of my package used as library. And also put my application into executable jar file. I edited following codes:
    uner path: D:\dd\b\b1
    package b.b1;
    public class Son
         int x = 10;
         public Son(){
         public int getX(){
              return x;
    under path D:\b\b2
    package b.b2;
    import b.b1.Son;
    public class Father
         public Father(){
         public static void main(String[] args)
              Son son = new Son();
              System.out.println("Hello World!"+son.getX());
    Then I used jar tool make two jar files and also make one of then has specified main class Manifest.mf.
    Here is my steps:
    D:\bb>edit kk.txt
    D:\bb>jar cmf kk.txt father.jar .\b\b2
    D:\bb>jar cf son.jar .\b\b1
    D:\bb>java -jar -classpath .;son.jar father.jar
    Exception in thread "main" java.lang.NoClassDefFoundError: b/b1/Son
    at b.b2.Father.main(Father.java:13)
    I really do not know what's going on?
    Interesting thing is I can get this result:
    D:\bb>java -classpath .;son.jar b.b2.Father
    Hello World!10
    And if the father.jar does not depend on son.jar,
    it is also works.
    Thanks in advance.

    I believe when you run with the -jar option, the classpath setting is ignore and you have to specify classpath in the manifest file.
    From JDK Doc:
    Class-Path :
    The value of this attribute specifies the relative URLs of the extensions or libraries that this application or extension needs. URLs are separated by one or more spaces. The application or extension class loader uses the value of this attribute to construct its internal search path.
    Sounds like you can specify a different path than the current directory, but you have to know beforehand what that path is.

  • Sender File Content Conversion Complexity

    It is again time to dip into the well of knowledge that is SDN.
    I have a question about sender file content conversion.  
    It appears that I can only create simple XML structures with it, but I'm hoping someone here can help.
    Lets says I have a file where each record layout is the same.   There are not header records, trailer records, etc.   Basically only one structure within the recordset.
    However the record itself may have a complicated structure.   For example, the layout of each record may be:
    String1, String2, String3, Array(0:3) consisting of String4, String5, String6.
    Can I convert that to a structure of
    <Node>
        <string1>
        <string2>
        <string3>
        <array>
            <string4>
            <string5>
            <string6>
        <array>
            <string4>
            <string5>
            <string6>
    </Node>
    Or must I create a DT containing one node giving string4,5 and 6 a unique name for each occurance?
    Thanks in advance.

    Hi,
    You can go with generic structure and then either in the adapter module or Mapping, you can format the structure. Because content conversion has a limitation to upto one level.
    check this for limitation-
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/50061bd9-e56e-2910-3495-c5faa652b710
    check this for generic structure-
    /people/sravya.talanki2/blog/2005/08/16/configuring-generic-sender-file-cc-adapter
    Rgds,
    Moorthy

  • Best way to send files back and forth between PC and Mini

    I know something similar like this has been asked a million times, but I couldn't quite find the answer I need. Basically I work on the PC and my new Mac Mini, and I want to be able to quickly share files between both of them. I know I could use a USB stick, but seeing both machines are sharing the same internet connection on the same router I was thinking there's a way to do it with that or wirelessly? migration assistant seems to just be about sending files to the mac and that's it.
    Thanks for any advice.

    That would be a standard Windows issue, but for starters, take a look here:
    http://guides.macrumors.com/Networking_Windows_with_Mac_OS_X#Accessing_your_Mac_ from_your_PC
    Regards.

  • Archive file with errors in sender file adapter not working! please help!

    Hi Experts,
       I have a file to RFC scenario. the input is a XML file. I have setup the flag in sender file adapter channel for archiving the input files with errors. But it is not working.
    For testing I have used an invalid xML file for example without the main XML tag. I have also tested with a MSWORD file saved with.xml extension. But in both the cases the files are not getting archived.
    My archive location permissions are fine and in fact normal archive operation is happening. That is, if I select the processing mode as "Archive" and gave the Archive directory then files are getting archived. The problem is only with the "Archive faulty source files" option.
    What am I missing? DO I need to do some more configurations?
    What are the prerequisites if any for this option?
    How to test this?
    Please help me! I will be greatfull to you all!
    Thanks & Regards
    Gopal

    and go thru this links
    Creating a Single Archive of the Version Files
    http://help.sap.com/saphelp_nw04/helpdata/en/79/1e7aecc315004fb4966d1548447675/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/31/8aed3ea86d3d67e10000000a114084/frameset.htm
    Note: reward points if solution found helpfull
    Regards
    Chandrakanth.k

  • I have a Samsung Galaxy S3 and I've paired it to my Mac. It was all working fine up until about a week ago, but now when I try to "Send file to device" nothing happens...

    I've had my Mac and my Samsung for about 2 yeas now and I haven't had any problems with the two in regards to Bluetooth. As of about a week ago, I could no longer send files from my Mac to my Samsung. I don't know what has gone wrong, but the devices are still paired and I haven't changed any settings. I don't understand how it can just stop working
    When I click the "send File to device" option, it doesn't freeze or give me any notice stating the devices are not connected, it just does nothing.

    I have the opposite problem. I cannot "browse device".
    I have a Samsung Galaxy S3 mini which was working fabulously through Kies and Bluetooth (on Lion) until I upgraded to Mavericks about 3 weeks ago.
    Now, when I go to Bluetooth and "Browse Device", the following happens:
    The Mac will eventually find the phone, say "connected" then it will say "the device does not have the necessary services".  This is despite the fact that both are discoverable and have been previously paired.
    Bizzarely though, I can send a file from my Mac to my phone through the "send file" command.  That works fine....
    Is there something I am doing wrong or is this problem just symptomatic of the ongoing Apple-Samsung spat?
    And yes, I know that Kies is now no longer supported by Mavericks and vice versa (boo!), so I have had to use other rather cranky solutions (Android File Transfer) and a faffy google calendar sync to sort the rest of the compatability problems out. The Bluetooth issue is just odd though. 
    If this is just an Apple-Samsung software war problem, I really wish both would grow up.  Many people no longer care who made what first, we just want stuff that works.  If iPhone contracts were cheaper, I would get one, but I refuse to pay more than £15 p/m for a mobile phone, sorry Apple.

  • Hi, Im new to Apple MacBook PRO. I have saved about 50GB files plus applications and message advises that my start up disk is almost full! My MacBook pro has a 500GB hard drive so don't know why this message is coming up. Please help.

    Hi, Im new to Apple MacBook PRO. I have saved about 50GB files plus applications and message advises that my start up disk is almost full! My MacBook pro has a 500GB hard drive so don't know why this message is coming up. Please help.

    MacBook Pro
    https://discussions.apple.com/community/notebooks/macbook_pro 
    https://discussions.apple.com/community/mac_os/mac_os_x_v10.7_lion?view=discussi ons

  • Help me please about export file is .wmv

    help me please about export file is .wmv from final cut pro
    It have black side at right and left in clip when export finished
    I have flip4mac program in my mac
    How do I edit.

    Let me help getting your question back to something we might understand.
    - You are exporting your video AS .wmv
    and
    - when you export it, there are black bars left and right of the image.
    How do you fix?
    Ok - what was the format of the video prior to your exporting it? When you edited it in FCP, what were the sequence settings? That will help get the right settings for flip4mac.
    CaptM

Maybe you are looking for

  • Cannot open itunes store

    A problem more ppl have to deal with as i can see on this forum, but none of the info i found here helped me so far. When i try to open the store in Itunes on my PC (Win XP), it tries to load, but stops after a while and leaves me with a blanc screen

  • Move the iBooks library to external/different hard drive?

    Hi!  Is it possible to move the iBooks library from its default location on the boot drive (where the iBooks-application also resides) to a different hard drive? Currently all my ebooks and PDF’s are kept in the default „Books“-folder in the home-lib

  • Can't burn 57 min imovie to idvd 5

    Everything works fine, but at the end my movie did not burn to the dvd. I had to go to best quality as it was originally 4.0, I deleted some of the movie so not it is 3.9. I just downloaded idvd 5.01 any other suggetions? thanks, Pam

  • Query regarding hex format in labview

    hello, I am getting hex data in labview in the format xxxx xxxx xxxx xxxx and i am trying to convert it into number format..so is this hex format valid or do i need to remove the spaces between them before conversion to a number?..any help would be a

  • Explict cursor state in a serially_reusable package

    hi all below there's a modified example taken from the Oracle documentation: CREATE TABLE people (name VARCHAR2(20)); INSERT INTO people (name) VALUES ('John Smith'); INSERT INTO people (name) VALUES ('Mary Jones'); INSERT INTO people (name) VALUES (