Can i write from a URLConnection ?

Can i write from a URLConnection ?
I can read but can i write on a txt file ?

You can upload, just as you would upload from an HTML page with a form and a Submit button. That's what you can do.

Similar Messages

  • How can I write from an Include?

    Hi to everybody!!
    I've a problem with my include...inside of this I've to write '2'. for make this I put...
    write: '2'.
    But when I execute the program... the number 2 doesn't appears, somebody told me that I need to put the End-OF-SELECTION, but when I can't see it.
    Does anybody know how can I write something from an include?
    Thanks a lot.
    Regards,
    Rebeca

    Try this way...
    I don't where you placed the include , you place under the event and see.
    REPORT ZTEST.
    END-OF-SELECTION.
    INCLUDE ZINCLUDE.

  • Follow up to 'can I write from a URL Connection'

    Hi,
    I think the sender of the original post was trying to do what I am. Sorry but I didn't understand the reponse given so I'm posting my own question.
    I have a survey applet that is intended for Intranet use only. The idea is to get the user to respond to a series of questions and then store the response, 1,2 or 3, as a string in a .TXT file.
    Here is my code snippet for the connection :-
    answURL = new URL(this.getCodeBase(),"answ.txt");
    answWeb = answURL.openConnection();
    answWeb.setDoOutput(true);
    answWeb.connect();
    answOutput = answWeb.getOutputStream();
    PrintWriter out = new PrintWriter(answOutput);
    out.println(allTheAnswers); // a String
    out.close();
    This compiles and runs without complaint but the output file is not updated.
    Ideally I wanted to append to the file.
    Reading other postings and Sun's tutorials I guess this is not possible, can I do this? or :-
    1) Write a CGI script to take the input?
    2) Write a servlet to take the input?
    3) Make a socket connection to a server app that will do this?
    4) Something else?
    I need to keep the solution as simple as possible.
    many thanks
    Chas

    Hi,
    I think here you want take some input from the user and write it in a file which resides on the sever.
    By opening an URL to a file you can only read the contents of that file, you can write any contents to it or append it.
    So as you said either you have to have a
    1. CGI script
    2. Socket connection or
    3. Servlet
    on the server.
    In the case of CGI script and Servlet you can use URL but in case of Socket Server you need to implement a socket client in your client application.
    More details about Reading and Writing from URL and Networking please read Java Online Tutorial.
    all the best,
    Raj

  • Hello AppleSupport. I recently erased my disk, and i can't find my OS X Install CD. Is there a way i can get a free cd? I have a iMac 27''. Im writing from the recovery menu, since i can't write from anything else ;( Help me please ;(

    Hello!
    I just registerd here from my iMac computer running on? Nope, its not running on any OS, im writing from the recorvery menu ;(
    I erased my whole disk, and i lost my install disc that came with my 27'' iMac...
    I dont know what to do, i do not have any money on my Apple Account..
    Is there a way i can borrow a account from you? Or is there a way i can get a new cd sended to my adress?
    I live in Singapore.
    Thank you for reading, and hopefully we can get some good answers!
    Noztra

    International Technical Support Numbers
    http://www.apple.com/support/contact/phone_contacts.html
    I am unfamiliar with the recovery manager.  Here are two guesses.
    -- Is system profiler around?  It will tell you your serial number.
    Report system info
    Blue apple > about this Mac
    click on more info
    click on hardware
    You serial number will appear after Boot ROM.  Do not copy hear.
    --- The newer machines include a recovery partition.  Perhaps looking around recovery manager would reveal something.
    Robert

  • Can I write from a mac partition to a windows partition made with bootcamp?

    I already tried using chmod in terminal, is there something I'm missing there? or is there a different setting I have to change?

    Real easy you need NTFS driver for OS X from Paragon.
    BootChamp
    http://www.macupdate.com/app/mac/28468/bootchamp
    MacDrive
    http://www.mediafour.com/updates/macdrive
    Paragon HFS
    http://www.paragon-software.com/home/hfs-windows/
    Paragon NTFS
    http://www.paragon-software.com/home/ntfs-mac/

  • Can't write to External HDD connected to AEBS

    +This is a repost from the SL Discussion...hopefully someone here can help...+
    I am logged in under my account, which is the Administrator Account. I am unable to write to Seagate 1 TB external HDD connected to AEBS base station.
    Under "Get Info"->Sharing and Permissions it reads "You have custom Access" and then shows just one account, "everyone" and this is a "Read Only" account. The format of the External Drive is shown as "Appleshare" (actual drive is formatted as NTFS so my Dell PC can read/write, which is functioning perfectly).
    I tried to change the "everyone" account to Read and Write but Mac 10.6.3 won't let me because "I don't have the necessary permissions".
    So then I tried to add another account (clicking the "+" sign) but it again rejects me because the account "isn't a valid name" although I am using my account name.
    I was able to read/write to this drive under Leopard but lost that function when I upgraded to 10.6.3. I can read the files on the drive and copy them to my iMac but I can't copy back to the drive. Is this a Finder problem?
    How can I get the permissions changed on this external drive so I can read/write from my Admin account?

    Okay, it is formatted as FAT32.
    I checked under Airport Utility and there are (2) accounts that have permitted access, Dad (Read/Write) and Mom (Read Only). The drive is not corrupted as I can read/write from the Dell PC without any issue and I can "Read" from my iMac.
    When I right click on the drive, "Get Info" and then check "Sharing/Permissions", there is only one account shown "everyone" (all small letters) with "Read" access. This account does not show up under "Airport Utility" so it is an account that Finder assigned.
    My other two accounts, that are correctly shown under Airport Utility, are not shown in Finder. It seems like this is a Finder Problem and Finder (under Snow Leopard) won't let me access the drive.
    So how can I change the Permissions in Finder? Even if Finder lets me add another account that can read/write, I'll be happy. But it won't let me add any accounts, it simply says "Invalid Account Name".
    I'll try the direct hookup to the iMac as a last resort but this drive has all of my photos backed up on it so I don't want to mess around too much with it. I have photos on other drives as well but it is a big pain to reload from the other drives...it is around 300 Gb of photos.

  • I'm unable to write/burn a CD-R (Verbatim) from a playlist after upgrading to iTunes 12.0.1.26. I get error 4000. I can however write/burn a CD from Windows Explorer and CDBurnerXP v4.5.4.5143 – which implies the device is working OK

    I’m unable to write/burn a CD-R (Verbatim) from a playlist after upgrading to iTunes 12.0.1.26. I get error 4000. I can however write/burn a CD from Windows Explorer and CDBurnerXP v4.5.4.5143 – which implies the device is working OK – and only fails when I write from iTunes.  The drivers are up to date
    Microsoft Windows 7 x64 Business Edition Service Pack 1 (Build 7601)
    Dell Inc. Latitude E6420
    iTunes 12.0.1.26
    QuickTime 7.7.6
    FairPlay 2.7.39
    Apple Application Support 3.1
    iPod Updater Library 12.0
    CD Driver 2.2.3.0
    CD Driver DLL 2.1.3.1
    Apple Mobile Device 8.0.5.6
    Apple Mobile Device Driver 1.65.0.0
    Bonjour 3.0.0.10 (333.10)
    Gracenote SDK 3.06.0.2770
    Gracenote MusicID 3.06.0.2770
    Gracenote Submit 3.06.0.2770
    Gracenote DSP 3.06.0.2770
    iTunes Serial Number 756D13C00C3583C8
    Current user is not an administrator.
    The current local date and time is 2015-01-13 14:47:35.
    iTunes is not running in safe mode.
    WebKit accelerated compositing is enabled.
    HDCP is supported.
    Core Media is supported.
    Video Display Information
    Intel Corporation, Intel(R) HD Graphics Family
    **** External Plug-ins Information ****
    No external plug-ins installed.
    iPodService 12.0.1.26 (x64) is currently running.
    iTunesHelper 12.0.1.26 is currently running.
    Apple Mobile Device service 3.3.0.0 is currently running.
    **** CD/DVD Drive Tests ****
    LowerFilters: SbCeCd (3.2.6.3),
    UpperFilters: GEARAspiWDM (2.2.3.0),
    F: HL-DT-ST DVD+-RW GU40N, Rev A103
    Drive is empty.
    The last failed audio CD burn had error code 4000(0x00000fa0). It happened on drive F: HL-DT-ST DVD+-RW GU40N on CDR media at speed 24X.
    F: HL-DT-ST DVD+-RW GU40N, Rev A103
    Audio CD in drive.
    Failed Reading table of contents, error 4000.
    Check the website of your computer or drive manufacturer to verify that you have the latest firmware for your CD / DVD drive.
    Audio CD reading failed. Error Code:   87 87 87 87 87 87 87 87 87 87 87 87 87 87 87 87 87 87 87 87.
    iTunes cannot play or import music from a CD in this drive. The drive may need a firmware update. Check with the manufacturer.
    Get drive speed failed. Error Code: 4000.
    The last failed audio CD burn had error code 4000(0x00000fa0). It happened on drive F: HL-DT-ST DVD+-RW GU40N on CDR media at speed 24X.

    Hi iTunes-1,
    Welcome to the Support Communities!  The error message you posted indicates a possible firmware update is needed for iTunes for Windows to work with your CD drive.  
    iTunes for Windows: Updating the firmware on your CD or DVD drive - Apple Support
    http://support.apple.com/en-us/HT201852
    Having outdated firmware can cause issues using CDs and DVDs with iTunes for Windows. Firmware is a type of software stored in a chip in hardware that can sometimes be updated.Identifying drives and firmware versions
    To run CD Diagnostics, follow the steps in this document.
    After following the steps to run CD Diagnostics linked above, look at section three to find out more about your optical drive(s).
    Here is an example of what section three might look like:
    In this example there are two drives. Drive E is a Samsung DVD-ROM drive with a model designation of SD-616 that has firmware version F000. Drive F is an NEC drive with a model designation of NR-7900A that has firmware version 1.08.Updating the firmware
    If the optical drive you are using came with your computer, check with the support site for your computer for a firmware update. Typically you will need to go to the support website for the computer maker and click on a "downloads" or "updates" link, and then enter your computer model designation and operating system version to see what updates are available. Then look through the available updates for a firmware update for your optical drive. Download the updater and run it. If you need assistance applying the update, contact the maker of your computer.
    If the optical drive you are using came as a separate part (was not included with a computer), check the support site for the drive maker for a firmware update. Sometimes the manufacturer is not clear in the CD Diagnostics results. In that case, you may just have to search the Internet for the drive model designation. You can usually find out who made the drive by looking through the results of such a search. Once you have identified who made your drive, go to the support website for that company. Look for a "downloads" or "updates" link, and then enter your optical drive model designation. Download the updater and run it. If you need assistance applying the update, contact the maker of the optical drive.Verifying that the firmware was updated
    Run CD Diagnostics again.
    Examine the CD Diagnostics results. The firmware version for the drive should be the new version.
    Information about products not manufactured by Apple, or independent websites not controlled or tested by Apple, is provided without recommendation or endorsement. Apple assumes no responsibility with regard to the selection, performance, or use of third-party websites or products. Apple makes no representations regarding third-party website accuracy or reliability. Risks are inherent in the use of the Internet. Contact the vendor for additional information.
    Last Modified: Nov 8, 2014
    Also, you mentioned that you have been successful burning a CD with the Windows OS.  Make sure that you have closed all software programs that can access the CD burner so that there isn't a conflict for the drive.   Sometimes chaning the burn speed from "maximum" to 8x can also help in this situation.
    I hope this information helps ...
    - Judy

  • IProblems=Can't read from/write to and Flipping through songs

    Yeah I'm getting the error "Can't read from or write to.", and the iPod itself will turn on, but when I put it on a playlist or album, it starts flipping through all the songs before it even gets a chance to play part of the songs. What gives?

    Please do a Restore - which erase all the music on your iPod.
    http://www.apple.com/support/ipod/five_rs/

  • Can't read or write from iPod when it syncs with a big library

    When I try to sync with my 50Gb size library in the iTunes installed on my iBook G4 (10.4.11), it appears "can't read or write from the ipod", in the middle of the synchronization. It starts to do the job very well, but when it has done only 6 or 8 Gb, the process got slower until it appears such message. I have iTunes 7.6 and ipod firmware 1.1. I have tried on Windows and Mac plattforms, trying all the combinations (Mac and/or Win formats) and the trouble persists. The device has only two weeks of use, and it was working perfectly until now. The problem it is the same if I do it manually (no automatic sync). I am not sure if the problem is defective hardware, does anybody have any idea or have similar problem? Thanks.

    Thanks a lot for your answer. The idea of an increasing autoplaylist it is pretty good. I did it, in 5 Gb steps, and in the thrid step (10 Gb done), when it only has copied almost one Gb, the error message pop up again. Before the message appears, iTunes become slower and slower copyng each song until it stops in one song, and after a while, message appears. After, the system come down, almost blocked, and it takes a long until I can mount the ipod again. Of course, ipod restarts automatically and the songs copied in the last step are not there. I was taking care in every moment of the process, avoiding to leave the system suspend alone (and also turning off all the saving energy options). I am now pretty sure that the problem is on the device. Anyway, thank you very much for your valuable ideas.

  • "Can't read from or write to disk...." iPod error

    I recently switched from my old PowerBook G4 (running Leopard 10.5.2) to a newer MacBook Pro (running Leopard 10.5.5). I migrated my account and permissions from the PB to the MacBook Pro, and everything is working just fine except for iTunes (version 8.0.2) and my older 160 GB iPod Classic (running 1.1.2).
    NOTE: THE VERSION OF iTunes ON THE PB WAS VERSION 8.0.1.
    Since the migration, I've been getting this "can't read from or write to disk..." error whenever I attempt to sync my iPod to iTunes. Previously, I'd never had any problems. I have tried to restore the iPod using iTunes - didn't work. I have tried different USB to dock connector cables - didn't work. I have even tried completely re-formatting the iPod using Disk Utility - didn't work. Everytime I begin syncing the iPod, it starts out just fine. At varying degrees of completion it ALWAYS fails with the same error.
    I had an idea. I tried syncing the iPod to a different computer - my G5 4 x 2.5 GHz (running Leopard 10.5.5) with iTunes (version 8.0.2). I still got the same error. I haven't dropped it, submerged it in water or done anything to it that would otherwise compromise its functionality. So, I'm at a loss.
    PLEASE! PLEASE! PLEASE!
    Does anyone have any other suggestions? - OTHER THAN BUYING A NEW IPOD

    UPDATE:
    OK, after the visit to my Genius Bar; I thought of a variable that wasn't previously considered. Because their transfer of media was successful without the slightest hitch, I had to figure out something else.
    Everytime I had tried to sync the iPod with my various Macs, I was using the same process. Since all of my music and movies "live" on an external 500 GB drive, I was attempting to use that same drive whenever I would try to sync. It occurred to me that possibly the failing was in the drive and not the iPod.
    I have part of that library on a Power Mac G4 867 DP (running 10.4.9). I updated the iTunes on that machine to 8.0.2, connected the iPod and made a successful transfer of a large amount of media!
    My only problem now is that I can't figure out how to get the 500 GB drive to stop hanging on transfer and update of my Genius information. The drive just completely stalls and I get the spinning wheel from iTunes and the application ceases to respond. When I force quit iTunes, the drive recovers fine. I don't have any problems transferring data to and from it and Disk Utility reports that the drive is healthy.
    I have tried re-installing iTunes on all affected Macs - didn't help. I believe my problem may exist in the iTunes Library file or in the associated .xml document. My only concern is that if I do a completely fresh install of iTunes where those files would be re-created, I would lose all of my play and ratings data as well as the information about when my files were added. On a related note, when playing the music from this drive through iTunes. I don't have any issues at all.
    ANY SUGGESTIONS?

  • Can't write on my usb pen drive from 2 days?!?

    hi, from 2 days i can't write on my usb pen drive (Transcend JetFlash Flash  16gb with FAT32 partition)
    if I do a manual mount in a console by root, I can easly a do cp command and copy files over.
    if I open dolphin and mount by hal the drive,  I can read but not copy files, and if I open a console and do a cp command, I have this error:
    cp: cannot create regular file `/media/OZETA/ownage.png': Read-only file system
    what the... is going on? i used my pen 4 or 5 days ago
    on the contrary, i can mount my sd card (fat32) and my 2 usb disk (fat32 and ntfs) and i can write on them.
    help
    Last edited by ozeta (2009-05-21 19:10:19)

    Have you tried running dosfsck on the device? Of course, be sure that you unmount the usb drive and verify the dev file of the relevant partition.
    Something like:
    dosfsck /dev/sdb1 <----replace with correct dev file!!
    to see what the problem is and then
    dosfsck -a /dev/sdb1
    Of course, I would strongly encourage you to backup all data on the drive first.
    Last edited by madalu (2009-05-22 12:45:26)

  • How can I write to a Siemens S7-300 PLC tag from OPC Server.vbai page by using a Knob object ?

    I am using NI OPC Server and I can read Siemens S7-300 PLC tags such as thermocouple values from the PLC. Additonally I can write manually a constant value to that tag by selecting it in the NI Distributed System Manager. And I can read the written value from NI Distributed System Manager or from NI OPC Server. But I can not write any value to the S7300 PLC tags such as by using a knob object at the NI Vision Builder AI Inpection (.vbai) page.
    Any help is welcomed. Thanks in advance.
    Attachments:
    manual_writing_to_plc.png ‏298 KB

    The tutorial at the following location explains how to use Vision Builder AI as a OPC server.
    https://decibel.ni.com/content/docs/DOC-18647
    http://www.ni.com/white-paper/13574/en
    To allow VBAI to connect to an OPC Server (i.e. act as an OPC client), you need to purchase and install the DSC Run-time System.
    Once installed, you can create an OPC I/O client using the Distributed System Manager, create variables bound to OPC tags, then create VBAI network variables that are bound to these variables.
    Another possible technical solution to connect to OPC Servers supporting Data Access 2.0 is to use the datasocket API in a Run LabVIEW step.
    http://forums.ni.com/t5/Machine-Vision/Read-and-Write-with-OPC-through-NI-Vision/m-p/2048278/highlig...
    Hope this helps.
    -Christophe

  • How can i write a code to get sume of value from days.

    Hi,
    how can i write a code to get the sum of value of days(example 1 to 30).
    This is in BPS ...
    i created multi planning area and creted planning function with {keyfigure name,planning area,days}.
    now i want to read all the actual values  from basic planing area(basic cube) and calculate the sum of the value.if you have idea can you share the code.
    ENTRIES = VARC ( 'zvardays' ).     ex(zvardays like 28 days or 29 days or 30 days or 31 days)
    COUNT = ENTRIES.
    *Get the all the days value from actual
    FOREACH PAREA = 'basic planning area'.
      COUNT = 1.
    DO
         SUM = SUM + {amount, count}      (amount is a keyfirgure value)
    ENDDO.
    COUNT = COUNT+1.
       SUMACT =  SUM.
    ENDFOR.
    can you correct the above code ....to read the values and sum of the those value.
    Thanks...

    Hi ..
    That is ok..
    Can you provide sample code for my requirement..
    and also how can i pass the error message (can you help me syntax )
    and if my acutal-total  is not equal to plan-total  then
    i have to pass the error message and then  i have to restrict save the data  how i can i restrict(user can not save the data until the values should be equal) .
    Can you help me it is very urgent..
    thanks.//
    Edited by: Eyda rose on Jun 4, 2008 9:29 PM

  • Can we write query for fomatted search without from clause

    can we write query for fomatted search without from clause as below.
    SELECT (($(u_amt)*14)/100)
    here U_amt is a UDF .I want to assign this to another field .
    Rgds,
    Rajeev

    Hi Rajeev,
    You can write query for FMS without from.  That is because you can omit it when you get value from active form by default.  The grammar of it is:
    Select $[$38.u_amt.0\] * 14/100 in your case if you have item type marketing document @line level.
    From View-System Information, you can get the info you need for your FMS query at the left bottom of your screen.
    Thanks,
    Gordon

  • How to read and write(a file .txt) from a URLConnection

    I try to read and write on one URLConnection. Is it possible ? How can i make it ?
    The reading part of my application work's but not the writting part
    That's a part of rhe code that i use to write :
    String Line = "Hi";
    MyUrl = new URL(this.getCodeBase(), FichierEvenement) ;
    Con = MyUrl.openConnection() ;
    Con.setDoOutput(true);
    Con.setDoInput(true);
    Con.setUseCaches(false);
    Dos = new DataOutputStream(new BufferedOutputStream(Con.getOutputStream( )));
    Dos.writeUTF(Line);
    Please help me :)

    What are you doing with the bytes written to the OutputStream? This info would help, but i do have a suggestion. I ran into this problem when trying to write strings using writeUTF. The output was all screwed up. So, maybe change your string to a character array. That way Unicode is displayed properly. This in conjunction with writing to an .html file instead of to the connection itself might work.

Maybe you are looking for

  • Can't install win 8 x64 on SSD partition on MacBook Pro

    I have a MacBook Pro with a 512gb SSD drive and I'm trying to use Bootcamp to install windows 8 off a flash drive to half of the SSD partition. When I get to the windows installation screen after reboot, it tells me I can't install to that partition

  • How To Create a SubVi and Limit Required Inputs

    Hello, Description: I have created a VI that reads in voltage values from the NI USB-6008 device. After putting that value into a formula, I compare the new value with an array of data and output a corresponding value (this is not too important for t

  • Java.lang.NoSuchMethod: main - Help pls

    This is the code i got off a book but it seems like it's not working. I got an error which says 'java.lang.NoSuchMethod: main' Help pls... import java.io.*; import java.util.*; class PostfixInterpreter {      private String postfixString, outputStrin

  • Virgin user here...Help! KVM monitor, keyboard, mouse switch

    Hi, I have a new mac mini that I currently have connected to a Gateway monitor. It works great, however, the pins on the cable are starting to bend. (from switching back and forth between PC and Mac) Found out I might be able to connect Mac mini, and

  • Internet Explorer 5.1 & OS 9.1

    I am looking to find out if there is an upgrade (any software) better IE 5.1 for OS 9.1. Some web site do not bring up all the pics. Sorry I have been out of touch with MAC stuff for a few years. Dave iMac   Mac OS 9.1.x   IE 5.1