How would you go about saving an online image locally?

Say if you knew the url such as http://www.yahoo.com/img.jpg
How would you save this locally?

Read the answer in your previous posting:
http://forum.java.sun.com/thread.jspa?threadID=772451
Use the file as an InputStream to read the data and then use an OutputStream to write the file.
The logic is the same as reading and writing a file from disk once you have the InputStream.

Similar Messages

  • How would you go about limiting file upload

    I don't need source code, just want to know if it's possible or how to go about limiting how many files a user can upload.
    So far
    I can limit what types of files get uploaded.
    I can limit how big those files can be.
    Is it possible, or how would you go about limiting how many files get sent?
    - When the user does a browse they can select multiple files.

    This is the best that I can come up with.
    Ripped from adobe cookbooks
    var fileList:Array = fileReferenceList.fileList;
    if( fileList.length > 4 )
        Alert.show("Too many files" , "Please try again with 4 or less files");
    else
       for (var i:Number=0; i<fileList.length; i++)
           var file:FileReference = FileReference(fileList[i]);
           arrayCollection.addItem({name:file.name, size:file.size, object:file})
    If this post was helpful , please mark it as such.

  • How would you go about retrieving your backed up data?

    How would you go about retrieving your backed up data from the Time Capsule?
    I have mine on auto back up (initial back up took 3 days)

    Time Machine FAQ

  • How would you go about doing this?  (some broken links)

    Okaaaayy,
    Let's say every link in your document has broken and you now have to go back into it and relink everything before print time tomorrow...
    Sure, no problem, but why did it happen.
    I know that if you rename a file or folder or move a linked image file out of it's original location, the link in Indesign gets broken, but what about surrounding/encompassing folders? Seems kinda weird.. but to provide an example I included a picture of how I have the uber-structure set up.
    What I actually did was rename (I think I did.) the "UBER"-folder's name
    "Prepress guide pages/ image links"
    What's inside of that folder is another folder for each page in the document with another separate folder for 'linked images'.
    MUSTA BEEN A BAD MOVE TO NENAME 'PREPRESS GUIDE IMAGE LINKS' BECAUSE ALL LINKS ARE BUSTED NOW.
    frikkin' indesign.
    Honestly, I never changed names or moved anything else, in fact..
    I spent most of my time organizing what you see on the picture here..
    minus the details... lol
    http://i14.photobucket.com/albums/a349/coffeyville1975/Picture4-4.png

    You changed the name of a folder containing your links. InDesign is
    still looking for the old folder name and won't go any further until it
    finds it.
    You really have a bit to learn about proper workflow but you'll get
    there. These types of mistakes are the kind that you usually only make
    once and learn from.
    One more piece of advice...lose the slashes in file names. They're not
    cross platform and you won't always be working in a vacuum.
    Bob

  • How would you go about making an html5 OS?

    I've seen it done, but I have no idea how people do it.  Anyone have any clue?

    Hi,
    this is possible with a textfield.
    Caption positioned above.
    Borders are visible with rounded corners and filled with blue.
    Appearance is customized with visible borders, rounded corners, fill color white.
    You need to manipulate the XML-source to get to look you explained.
    Select the textfield and switch to XML source view.
    Then remove the bold parts of the source code.
    <corner join="round" radius="5mm" thickness="0.3mm"/>
    <corner join="round" radius="5mm" thickness="0.3mm"/>
    <corner join="round" radius="5mm" thickness="0.3mm"/>
    <corner join="round" radius="5mm" thickness="0.3mm"/>
    As result you get.
    Here an sample file:
    https://acrobat.com/#d=0gwoBB7OE0enmnQi5bFcCA
    Radzmar
    http://thelivecycle.blogspot.com/

  • How would you go about making this in LiveCycle?

    Hi everyone,
    I need to make the shape attached in LiveCycle for one of my forms. I can not figure out what the best way to tackle it is. If I draw the rectangle, then cut it with a line, I still am stuck having to fill the entire rectangle one color.
    Your suggestions are much appreciate.
    Thanks!!

    Hi,
    this is possible with a textfield.
    Caption positioned above.
    Borders are visible with rounded corners and filled with blue.
    Appearance is customized with visible borders, rounded corners, fill color white.
    You need to manipulate the XML-source to get to look you explained.
    Select the textfield and switch to XML source view.
    Then remove the bold parts of the source code.
    <corner join="round" radius="5mm" thickness="0.3mm"/>
    <corner join="round" radius="5mm" thickness="0.3mm"/>
    <corner join="round" radius="5mm" thickness="0.3mm"/>
    <corner join="round" radius="5mm" thickness="0.3mm"/>
    As result you get.
    Here an sample file:
    https://acrobat.com/#d=0gwoBB7OE0enmnQi5bFcCA
    Radzmar
    http://thelivecycle.blogspot.com/

  • How would you go about replicating this text effect?

    I've seen this nice effect and would like to know the easiest way to create it more or less exactly as seen in the attached image. I had started making a few template pieces with the idea of using the pathfinder for each section, though realistically this would take hours to do properly.
    If anyone knows a better way it would be greatly appreciated!
    Please excuse the word itself
    Thanks,
    Wills

    You need the text outlined and then made into a compound paths and some lines on top.
    Then select all and click the pathfinder "Divide". Then move the shapes around.
    Try Object > Transform > Transform each to move them. Has a random mode.

  • How would you write a "wildcard" in a filefilter?

    How would you go about to have a wildcard instead of the "*" in the following filefilter;
              File[] files = new File("./resultat/resultat_" + "*" + "_" + index[0]).listFiles (new FileFilter () {
                    public boolean accept (File file) {
                        return ! file.isDirectory ();
              });All help appriciated
    - Karl XII

    Shouldn't "a*" accept all files that begins with "a" and ends with whatever?No. "*" in regexp is a not a wildcard match. Instead it matches one or more instances of the preceeding
    value.
    Therefore "a*" will match "a", "aa", "aaa", "aaaa" etc but will not match anything which does not end in
    an "a".
    The following might help you out. (not the most elegent expression but it will do
    import java.util.regex.*;
    public class RegExp{
      public static void main(String[] args) {
      Pattern p = Pattern.compile("a*b");     
      Matcher m = p.matcher("aaaab");     
      System.out.println(m.matches());                    
      // interesting bit here
      // match one or more occurances of any characters in the ASCII charset  (the \\p{ASCII}* bit   
      p = Pattern.compile("hello_\\p{ASCII}*_b");     
      m = p.matcher("hello_wibble_b");     
      System.out.println(m.matches());
    }

  • Dates : How would you do this.

    mx:DateChooser has a selectableRange property where you can set a rangeStart and a rangeEnd...
    Is it possible, or how would you go about doing it so it's a nonSelectable range.
    a user clicks on 3 days, so the calendar marks that off, so another user won't be able to select those same 3 days type of thing...

    d'oh
    .disabledRanges
    *SIGH*

  • In Security, clicking on the "Saved Password" button displays your current saved password for each site. It does not allow you to change a password. How would you do that?

    In Security, clicking on the "Saved Password" button displays your current saved password for each site. It only allows you to view and delete site passwords. It does not allow you to change a password. How would you do that?

    If you enter a new password Firefox should offer to change the password.
    *You may not need to delete the old password. Try "Refreshing" the page, entering the site again, you may need to let Firefox fill in the old password, then enter the new password, and Firefox should ask to save the new password. See:
    **http://kb.mozillazine.org/Deleting_autocomplete_entries
    *If you delete the old password, you may need to "Refresh" the site after deleting the old password.
    If you want to delete the password that has been saved do the following:
    #In the Tools menu select Options to open the options window
    #Go to the Security panel
    #Click the "Saved Passwords" button to open the passwords manager
    #Select the site in the list, then click Remove
    <br />
    <br />
    '''You need to update the following.''' The Plugin version(s) shown below was/were submitted with your question and is/are out of date. You should update to avoid known security issues with the version(s) you have installed. Click on "More system info..." to the right of your question to see what was included with your question.
    *Adobe PDF Plug-In For Firefox and Netscape 8.3.0 (''Note: this is a very old version and installing the current version may not delete it or overwrite it. To avoid possible problems with having 2 versions installed on your system, you may want to remove the old version in Windows Control Panel > Add or Remove Programs before installing the new version'').
    *Shockwave Flash 10.3 r181 (''this may be current but a new version was released on 2011-06-14 with a ".26" after the "181". You can use the Plugin Check below and/or look in Add-ons > Plugins for the version of Shockwave Flash that you have installed. The newest version will be shown in Add-ons > Plugins as "Shockwave Flash 10.3.181.26"'').
    *Next Generation Java Plug-in 1.6.0_24 for Mozilla browsers
    #'''''Check your plugin versions''''' on either of the following links':
    #*http://www.mozilla.com/en-US/plugincheck/
    #*https://www-trunk.stage.mozilla.com/en-US/plugincheck/
    #*'''Note: plugin check page does not have information on all plugin versions'''
    #*There are plugin specific testing links available from this page:
    #**http://kb.mozillazine.org/Testing_plugins
    #'''Update Adobe Reader (PDF plugin):'''
    #*From within your existing Adobe Reader ('''<u>if you have it already installed</u>'''):
    #**Open the Adobe Reader program from your Programs list
    #**Click Help > Check for Updates
    #**Follow the prompts for updating
    #**If this method works for you, skip the "Download complete installer" section below and proceed to "After the installation" below
    #*Download complete installer ('''if you do <u>NOT</u> have Adobe Reader installed'''):
    #**SAVE the installer to your hard drive (save to your Desktop so that you can find it after the download). Exit/Close Firefox. Run the installer you just downloaded.
    #**Use either of the links below:
    #***https://support.mozilla.com/en-US/kb/Using+the+Adobe+Reader+plugin+with+Firefox ''(click on "Installing and updating Adobe Reader")''
    #***''<u>Also see Download link</u>''': http://get.adobe.com/reader/otherversions/
    #*After the installation, start Firefox and check your version again.
    #'''Update the [[Managing the Flash plugin|Flash]] plugin''' to the latest version.
    #*Download and SAVE to your Desktop so you can find the installer later
    #*If you do not have the current version, click on the "Player Download Center" link on the "'''Download and information'''" or "'''Download Manual installers'''" below
    #*After download is complete, exit Firefox
    #*Click on the installer you just downloaded and install
    #**Windows 7 and Vista: may need to right-click the installer and choose "Run as Administrator"
    #*Start Firefox and check your version again or test the installation by going back to the download link below
    #*'''Download and information''': http://www.adobe.com/software/flash/about/
    #**Use Firefox to go to the above site to update the Firefox plugin (will also install plugin for most other browsers; except IE)
    #**Use IE to go to the above site to update the IE ActiveX
    #*'''Download Manual installers'''.
    #**http://kb2.adobe.com/cps/191/tn_19166.html#main_ManualInstaller
    #**Note separate links for:
    #***Plugin for Firefox and most other browsers
    #***ActiveX for IE
    #'''Update the [[Java]] plugin''' to the latest version.
    #*Download site: http://www.oracle.com/technetwork/java/javase/downloads/index.html (Java Platform: Download JRE)
    #**'''''Be sure to <u>un-check the Yahoo Toolbar</u> option during the install if you do not want it installed.
    #*Also see "Manual Update" in this article to update from the Java Control Panel in Windows Control Panel: http://support.mozilla.com/en-US/kb/Using+the+Java+plugin+with+Firefox#Updates
    #* Removing old versions (if needed): http://www.java.com/en/download/faq/remove_olderversions.xml
    #* Remove multiple Java Console extensions (if needed): http://kb.mozillazine.org/Firefox_:_FAQs_:_Install_Java#Multiple_Java_Console_extensions
    #*Java Test: http://www.java.com/en/download/help/testvm.xml

  • Hi my iph4s wont turn on or off and seems to be zoomed into a particular part of the screen, loads normally when rebooted the phone. what is wrong with it? and how would i go abouts fixing it?thanks

    hi my
    iph4s wont turn on or off and seems to be zoomed into a particular part of the screen, loads normally when rebooted the phone. what is wrong with it? and how would i go abouts fixing it?
    also recovery mode shows up as a red icon instead of a blue one, not jail broken or had any third party alterations
    thanks

    Reset the PRAM
    Reinstall the operating system from the dvd (you will not loose your data)

  • Can anyone offer some advice i am looking to upgrade the OS system on one of my macbook pro's, currently running os10.4.11, I would like to upgrade to OS10.5? how would I go about this, and is there a cost, for what is an old operating system now?

    Can anyone offer some advice i am looking to upgrade the OS system on one of my macbook pro's, currently running os10.4.11, I would like to upgrade to OS10.5? how would I go about this, and is there a cost, for what is an old operating system now?

    Since your Mac probably came with 10.4, there is no longer a way to get 10.5 Leopard install media. IF it has the requirements, you may be able to upgrade to 10.6 Snow Leopard by buying the boxed install media at the Apple Store for $30.
    System requirements are found here: http://support.apple.com/kb/SP575
    General support can be found here: http://www.apple.com/support/snowleopard/

  • How would YOU retype these old XM08 types for use in an ABAP OO method?

    The XM08 function group has the following type declarations:
    TYPES: BEGIN OF mmcr_drseg_co.
            INCLUDE STRUCTURE cobl_mrm_d.
    TYPES: cr LIKE drseg_cr    OCCURS 0,
           unpl_refwr TYPE refwr,
           END OF mmcr_drseg_co.
    TYPES: mmcr_tdrseg TYPE mmcr_drseg OCCURS 0,
    TYPES: BEGIN OF mmcr_drseg.
            INCLUDE STRUCTURE drseg.
    TYPES: cr LIKE drseg_cr OCCURS 0,
           co TYPE mmcr_drseg_co OCCURS 0,
           sm LIKE drseg_sm OCCURS 0,
           charact TYPE rbcharact_instance OCCURS 3,
                                           "instances of characteristics
           uebgmat  TYPE matnr,
           uebrblgp TYPE rblgp,
           selkz_db TYPE selkz,
           rblgp_old TYPE rblgp,           "rblgp before aggregation
           END OF mmcr_drseg.
    How would YOU redeclare these types so that they work in an ABAP Objects class?  
    Some of the "fixes" are easy, like replacing "LIKE" with "TYPE:".
    But what about the "INCLUDE STRUCTURE" and the "occurs 0" specifications?
    The reason I'm asking this is that I have to call a method from ZXM08U16 and I'd like to be able to pass this method exactly what XXM08U16 gets from SAP, i.e. the table E_TDRSEG of type  MMCR_TDRSEG

    David,
    I wonder it can be directly in ABAP (I would like to hear opinions from others as well!), I needed to use Data Dictionary as well:
    TYPES: BEGIN OF mmcr_drseg_co.
            INCLUDE STRUCTURE cobl_mrm_d.
    TYPES: cr TYPE z_tt_drseg_cr,
           unpl_refwr TYPE refwr,
           END OF mmcr_drseg_co.
    z_tt_drseg_cr is a table type created in SE11, based on structure drseg_cr.
    the way to create internal table and work area, based on the above:
    DATA : gt_... TYPE TABLE OF mmcr_drseg_co.
    DATA : gw_... TYPE mmcr_drseg_co.
    hope this helps some
    ec
    UPDATE : Rich is right, it is possible to do it only in ABAP with the DEFAULT KEY addition.

  • HT2490 my desktop and screen saver option is no longer available in the system preferences. meaning it is no longer listed. how would i go about getting it back?

    my desktop and screen saver option is no longer available in the system preferences. meaning it is no longer listed. how would i go about getting it back?

    If you used system cache cleaning software it can mess up Apple software.  Stop using such software.  Remove Mackeeper if present using these directions:
    https://discussions.apple.com/docs/DOC-3691
    If you started typing something in the search field of the System Preferences, it might be hiding.   Quit and reopen System Preferences to be sure it isn't hiding because it is searching for another panel.
    Lastly, if none of the above apply, go to your hard drive -> System -> Library -> PreferencesPanes folder and see if it is hiding there.  If it isn't, get your 10.5 installer disc that installed 10.5 on your Mac, and restore it with http://www.charlessoft.com/ 's Pacifist, and then run the 10.5.8 combo update to ensure the version matches the operating system.

  • Good afternoon. I have created a Form in Indesign, imported into FormsCentral. I would like to post this onto a webpage. It is currently an iPDF. How would I go about doing this. I cannot 'Place it'. Thanks

    Good afternoon.
    I have created a Form in Indesign, imported into FormsCentral.
    I would like to post this onto a webpage. It is currently an iPDF.
    How would I go about doing this. I cannot 'Place it'.
    Thanks

    The only way to use Forms Central would be to export it the method that gives you the embed code (can't remember what the actual term is off hand) and then use Object--->Insert HTML and past your code in.

Maybe you are looking for

  • Using NI & non-TDM plugz on HD/2 system with Logic 8 as front-end

    For the life of me I can not figure out why in Logic 8, using a TDM Configuration, why I can only use what looks to be TDM plugz in my session? I used to love being able to run Guitar Rig as a DAE channel in Logic... Did Apple do away with RTAS suppo

  • Unable to load itunes

    I use my itunes frequently, but went to use yesterday and got the following message - windows cannot access the specified device, path, or file. You may not have the appropriate permissions to access the item - in desperation I deleted itunes and att

  • Custom Workflow Activity not showing in Plugin Registration

    Could anybody suggest what I am doing wrong here? I have created a Custom Workflow Activity using this sample Create a custom workflow activity. But this is not showing up as a plugin/activity type in Plugin Registration Tool. See image below: My sam

  • Unable to authorize computer

    I just tried downgrading Quicktime to 7.0.1. (from 7.0.4) because of some problems I was having with synchronizing music with pictures in an iDVD slideshow. When I opened iDVD to try a new burn, I got a message saying This computer is not authorized

  • Why are my pictures being saved so large?!?!

    I'm really hoping someone on here can help!  I've never had this problem before until the recently.  I open up a picture that I've taken, which is 3 MB, and do just a bit of editing.  I'll crop, adjust the curves, and that's it.  When I go to save it