Help with download large file (~50mb) from http protocol

I'm just using the default HttpURLConnection to download a large file from a server, I can never finish downloading before I get this exception:
java.net.SocketException: Connection reset
     at java.net.SocketInputStream.read(SocketInputStream.java:168)
     at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
     at java.io.BufferedInputStream.read1(BufferedInputStream.java:258)
     at java.io.BufferedInputStream.read(BufferedInputStream.java:317)
     at sun.net.www.MeteredStream.read(MeteredStream.java:116)
     at java.io.FilterInputStream.read(FilterInputStream.java:116)
     at sun.net.www.protocol.http.HttpURLConnection$HttpInputStream.read(HttpURLConnection.java:2446)
     at sun.net.www.protocol.http.HttpURLConnection$HttpInputStream.read(HttpURLConnection.java:2441)
        ...The file is on IIS web server, its a static file, not a server script, web service, or anything special. I usually can download 10-30 mb before this exception occurs. I'm using java 1.6.0_11 on windows xp, anyone have suggestions or experience downloading large files with java?

Thank you everyone for their suggestions. I tried wget, and it worked fine, but I tried a couple of different clients and they were failing too. I assume wget has resume capabilities, so I debugged the server and found the issue. It was a connection problem on the server end.

Similar Messages

  • Can't download large files keynote from iclound

    i can not download file  keynote large file to present(1.4 GB on my iCloud ) . In old version i can download this file but now i can"t .  alert massage me to reduce the presentation 's size .How can i do the comment from iCloud. i cant reduce size on icloud app.

    Hello there, medtuk.
    The following Knowledge Base article offers up the steps for downloading your Keynote file from iCloud to your computer:
    Keynote for iCloud beta: Download a presentation to your computer
    http://support.apple.com/kb/PH12873
    Once you've downloaded the file you can make changes to reduce it's size.
    Thanks for reaching out to Apple Support Communities.
    Cheers,
    Pedro.

  • Help with an audio file - vows from a wedding.

    Evening all,
    My wife and I filmed a wedding yesterday and our wireless mic which was hooked up to the groom's lapel decided to cut out literally seconds before he spoke his vows. When I got the mic back from him, everything was soaked, literally dripping and also extremely warm. He couldnt explain why it was so wet, sweat he said. Unfortunately we lost our crystal clear version of the vows and have to work with a secondary version. We had two other cameras going as well as our primary. My wife had a Rode Shotgun mic on her camera and picked up the groom and brides vows, but you can hear the constant hum of the mic. I have dumped the file onto FileSnack and have provided the link to check out. Is there anything we can do to make this sound better, as well as perhaps bring up the audio from the bride and groom.
    http://snk.to/f-ct9yxq4s
    Hope one of you audio engineering savants can help out! Thank you very much in advance!
    Sincerely,
    L+J Films

    I've had a little play and Steve's right that there's no miracles to be had.  However, have a play with Audition's EQ section and try taking down the level between 3k and 4k.  That gives you a slightly boxy sounding voice but also cuts some of the clicky sound--it's a balancing act to decide how much EQ you want.  FYI, I tried both the 31 band graphic with 3.2k pulled down a lot and 4k somewhat down.  I also played with the parametric with a fairly steep Q centred around 3.7k.  I think the parametric will eventually do the better job but ran out of time when a paying job turned up.
    A bit of high and low cut would probably help as well and maybe some slight boost in the 250-800 range to help the intelligibility.
    Anyhow, hope this helps.
    Now, a tip for "next time".  Sweat outs are common in theatre where we often hide mics in the hairline.  If if have any inkling of an impending problem, spray a small section of an old pair of ladies stockings or panty hose with Scotchguard, cut out a small circle and stretch it over the mic capsule--a rubber band can hold it tight.  Similarly, putting the TX pack in an unlubricated condom or a ziplock bag with only then antenna peaking out protects that end.

  • Help with downloading software I bought from a store.

    I have bought Adobe Photoshop CS6 Extended Student and Teacher Edition from a retail store. It came as a software download card. I submitted my student verification and it was accepted. I now have my new serial number. How do I actually download my software?? It says I have registered it but I don't know how to get it.

    If the registration and verification went through, you have a download on your Adobe account. Otehrwise you can always download a trial version and activate it:
    CS6 product downloads
    Mylenium

  • Help with download of XOS Lion from App store

    i am trying to download XOS Lion, but it is taking forever (like five hours) and it still does not finish nor install. Am I missing something? It runs on Core 2 dual and has 2G of Ram, still has 114G left.

    The download speed all depends on the speed of your home internet speeds, not the computer. I have heard of some people having to wait 12 hours for it to download.
    If you have an ethernet cable available, connect your Mac to the internet through there and it might help.

  • Need some help with downloading PDF's from the net.

    need some help with downloading PDF's from the net.  Each time I try to click on a link from a website, if it takes me to a new screen to view a pdf, it just comes up as a blank black screen?  any suggestions?

    Back up all data.
    Triple-click the line of text below to select it, the copy the selected text to the Clipboard (command-C):
    /Library/Internet Plug-ins
    In the Finder, select
    Go ▹ Go to Folder
    from the menu bar, or press the key combination shift-command-G. Paste into the text box that opens (command-V), then press return.
    From the folder that opens, remove any items that have the letters “PDF” in the name. You may be prompted for your login password. Then quit and relaunch Safari, and test.
    The "Silverlight" web plugin distributed by Microsoft can also interfere with PDF display in Safari, so you may need to remove it as well, if it's present.
    If you still have the issue, repeat with this line:
    ~/Library/Internet Plug-ins
    If you don’t like the results of this procedure, restore the items from the backup you made before you started. Relaunch Safari again.

  • TS1368 when downloading large files such as videos of television season do you need to turn off autolock to prevent download from halting

    when downloading large files such as videos of a television season do you need to turn off autolock to prevent download from halting? And if so, if the download will take a significant amount of time (not sure how much offhand) how do you prevent burn in from prolonged screen image?

    Among the alternatives not mentioned... Using a TiVo DVR, rather than the X1; a Roamio Plus or Pro would solve both the concern over the quality of the DVR, as well as providing the MoCA bridge capability the poster so desperately wanted the X1 DVR to provide. (Although the TiVo's support only MoCA 1.1.) Just get a third-party MoCA adapter for the distant location. Why the hang-up on having a device provided by Comcast? This seems especially ironic given the opinions expressed regarding payments over time to Comcast. If a MoCA 2.0 bridge was the requirement, they don't exist outside providers. So couldn't the poster have simply requested a replacement XB3 from the local office and configured it down to only providing MoCA bridging -- and perhaps as a wireless access point? Comcast would bill him the monthly rate for the extra device, but such is the state of MoCA 2.0. Much of the OP sounds like frustration over devices providing capabilities the poster *thinks* they should have.

  • Airport Extreme with Ubee D3.0 - cannot download large files.

    Hello all Macoids!
    Here is my issue...
    I am on Charter Cable Network using Charter's provided modem Ubee D3.0 It is connected to an AirPort Extreme "main base" vie ethernet cable. That AirPort Extreme that I call "main base" distributes the WiFi throughout the apartment to other AirPort devices. And it all works.
    However...
    I cannot download large files on Wi-Fi using iMac or even while connected to the AirPort Extreme main base via ethernet cable on my MacBook. What is interesting that inside of iTunes I can download large files with TV shows episodes just fine, but the update to an iPhone or an iPad will stop after 10 or 100 megs with error message "Unknown Error 9006" occurred. Interestingly enough, if I will drag the Download window in iTunes around while it is downloading 1.4 gig iOS update file for iPhone 5 - it will complete fine. So it looks like Airport main base (or whichever Mac is used) looses the connection to a download server or Ubee D3.0 modem, unless I constantly "renew" it by dragging the Download window around.
    That is quite annoying to do for 15-20 minutes… Same happens on MacBook Pro that is actually connected to an AirPort Extreme main base via ethernet cable...
    Macbook running OS 10.9
    iMac running OS 10.8.5
    Same thing.
    I would've call Charter but knowing well they have usually no idea what is up I thought to ask here if anyone has the same problem….?
    Any smart suggestions not based on experience?
    Anything appreciated very much!

    I ended up reformatting with HFS and the problem was solved, sort of.  The AEBS can now handle large files.  But that allowed me to expose yet another serious firmware bug (version 7.6.1), namely that if you use "account" style fileshares, the fileshares are not reliably accessible anymore, and frequent rebooting of the AEBS is needed to bring them back.  A quick test for whether this has happened is just attempt at ten-minute intervals to create a file on a read-write share.  You'll find it can work for up to a few hours, but at some point it will fail.  Makes the AEBS essentially unusable for account-based fileshares.  I
    With firmware 7.5, I'd noticed a variation of this problem, which was that editing the fileshare permissions on the AEBS resulted sometimes in a corruption of the fileshare rights.  When this happened, you needed to reinitialize the AEBS completely.  So I hoped that in 7.6 they fixed the probems.  They fixed that one but added the new one.
    For now, the workaround seems to be using a device-based password for the fileshares, and forgetting about account-based shares.  The huge problem presented by this approach is that all users have full access, so I await Apple's next attempt at stable firmware with great anticipation.  If only they had a beta test program, other than their users, we would not be in this near-constant state of working around serious bugs.

  • How to download a file version from office 365 using csom

    I need to download an older file version from office 365 and get the data into a byte array. I have no trouble downloading the latest version with File.OpenBinaryStream() and I have no trouble loading the previous file versions with File.Versions. But now
    I need to actually download an older version of the file and it seems the only way is to use File.OpenBinaryDirect. So I am creating a client context using my oAuth access token and providing the correct path, but I am getting a (401) Unauthorized
    error. Looking with Fiddler I can see that the call to OpenBinaryDirect is somehow trying to post to my file URL and the server is responding with 401.
    context = TokenHelper.GetClientContextWithAccessToken(SPHostUrl, AccessToken);
    FileInformation info = File.OpenBinaryDirect(context, "/" + _fileVersion.Url);  //throws 401
    //leading slash required otherwise ArgumentOutOfRangeException
    I have to be able to access the older file versions with my c# code -- I don't have a viable app without that ability -- any help urgently needed and greatly appreciated!

    Thank you SO much (Can't wait for the next release)!
    For anyone else who lands here, here's the code I ended up using:
    // VersionAccessUser and VersionAccessPassword are stored in web.config
    // web.Url is loaded via the clientContext
    // myVersion is the FileVersion I got from the file's Versions.GetById() method
    // probably a lot of ways to get hostUrl, it just needs to be https://yourdomain.sharepoint.com/
    // - I'm running my app from a subweb
    // I had trouble following the links to get the full MsOnlineClaimsHelper code
    // (the one on msdn.com was missing RequestBodyWriter, WSTrustFeb2005ContractClient,
    // and IWSTrustFeb2005Contract
    // so I've included the code I used here.
    string myVersionFullUrl = string.Format("{0}/{1}", web.Url, myVersion.Url);
    string userName = WebConfigurationManager.AppSettings.Get("VersionAccessUser");
    string strPassword = WebConfigurationManager.AppSettings.Get("VersionAccessPassword");
    string hostUrl = Regex.Replace(web.Url, "([^/]+//[^/]+/).*", "$1");
    MsOnlineClaimsHelper claimsHelper = new MsOnlineClaimsHelper(hostUrl, userName, strPassword);
    var client = new WebClient();
    client.Headers["Accept"] = "/";
    client.Headers.Add(HttpRequestHeader.UserAgent, "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; .NET CLR 1.0.3705;)");
    client.Headers.Add(HttpRequestHeader.Cookie, claimsHelper.CookieContainer.GetCookieHeader(new Uri(hostUrl)));
    var document = client.DownloadString(myVersionFullUrl);
    // These classes are needed to download old versions of files (see: http://social.msdn.microsoft.com/Forums/en-US/7746d857-d351-49cc-b2f0-496663239e02/how-to-download-a-file-version-from-office-365-using-csom?forum=sharepointdevelopment)
    // I cobbled this file from http://social.technet.microsoft.com/Forums/msonline/en-US/4e304493-7ddd-4721-8f46-cb7875078f8b/problem-logging-in-to-office-365-sharepoint-online-from-webole-hosted-in-the-cloud?forum=onlineservicessharepoint
    // and http://fredericloud.com/2011/01/11/connecting-to-sharepoint-with-claims-authentication/
    using Microsoft.IdentityModel.Protocols.WSTrust;
    using Microsoft.SharePoint.Client;
    using System;
    using System.Collections.Generic;
    using System.IO;
    using System.Linq;
    using System.Net;
    using System.Net.Security;
    using System.ServiceModel;
    using System.ServiceModel.Channels;
    using System.Text;
    using System.Web;
    using System.Xml;
    using System.Xml.Linq;
    namespace DPSiDoxAppWeb.Helpers
    /// <summary>
    /// Create a new contract to use for issue claims for the SharePoint requests
    /// </summary>
    [ServiceContract]
    public interface IWSTrustFeb2005Contract
    [OperationContract(ProtectionLevel = ProtectionLevel.EncryptAndSign,
    Action = "http://schemas.xmlsoap.org/ws/2005/02/trust/RST/Issue",
    ReplyAction = "http://schemas.xmlsoap.org/ws/2005/02/trust/RSTR/Issue",
    AsyncPattern = true)]
    IAsyncResult BeginIssue(Message request, AsyncCallback callback, object state);
    Message EndIssue(IAsyncResult asyncResult);
    /// <summary>
    /// Implement the client contract for the new type
    /// </summary>
    public class WSTrustFeb2005ContractClient : ClientBase<IWSTrustFeb2005Contract>, IWSTrustFeb2005Contract
    public WSTrustFeb2005ContractClient(Binding binding, EndpointAddress remoteAddress)
    : base(binding, remoteAddress)
    public IAsyncResult BeginIssue(Message request, AsyncCallback callback, object state)
    return Channel.BeginIssue(request, callback, state);
    public Message EndIssue(IAsyncResult asyncResult)
    return Channel.EndIssue(asyncResult);
    /// <summary>
    /// Create a class that will serialize the token into the request
    /// </summary>
    class RequestBodyWriter : BodyWriter
    readonly WSTrustRequestSerializer _serializer;
    readonly RequestSecurityToken _rst;
    /// <summary>
    /// Constructs the Body Writer.
    /// </summary>
    /// <param name="serializer">Serializer to use for serializing the rst.</param>
    /// <param name="rst">The RequestSecurityToken object to be serialized to the outgoing Message.</param>
    public RequestBodyWriter(WSTrustRequestSerializer serializer, RequestSecurityToken rst)
    : base(false)
    if (serializer == null)
    throw new ArgumentNullException("serializer");
    _serializer = serializer;
    _rst = rst;
    /// <summary>
    /// Override of the base class method. Serializes the rst to the outgoing stream.
    /// </summary>
    /// <param name="writer">Writer to which the rst should be written.</param>
    protected override void OnWriteBodyContents(XmlDictionaryWriter writer)
    _serializer.WriteXml(_rst, writer, new WSTrustSerializationContext());
    public class MsOnlineClaimsHelper
    #region Properties
    readonly string _username;
    readonly string _password;
    readonly bool _useRtfa;
    readonly Uri _host;
    CookieContainer _cachedCookieContainer = null;
    DateTime _expires = DateTime.MinValue;
    #endregion
    #region Constructors
    public MsOnlineClaimsHelper(string host, string username, string password)
    : this(new Uri(host), username, password)
    public MsOnlineClaimsHelper(Uri host, string username, string password)
    _host = host;
    _username = username;
    _password = password;
    _useRtfa = true;
    public MsOnlineClaimsHelper(Uri host, string username, string password, bool useRtfa)
    _host = host;
    _username = username;
    _password = password;
    _useRtfa = useRtfa;
    #endregion
    #region Constants
    public const string office365STS = "https://login.microsoftonline.com/extSTS.srf";
    public const string office365Login = "https://login.microsoftonline.com/login.srf";
    public const string office365Metadata = "https://nexus.microsoftonline-p.com/federationmetadata/2007-06/federationmetadata.xml";
    public const string wsse = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd";
    public const string wsu = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd";
    private const string userAgent = "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)";
    #endregion
    class MsoCookies
    public string FedAuth { get; set; }
    public string rtFa { get; set; }
    public DateTime Expires { get; set; }
    public Uri Host { get; set; }
    // Method used to add cookies to CSOM
    public void clientContext_ExecutingWebRequest(object sender, WebRequestEventArgs e)
    e.WebRequestExecutor.WebRequest.CookieContainer = getCookieContainer();
    //e.WebRequestExecutor.WebRequest.UserAgent = userAgent;
    // Creates or loads cached cookie container
    CookieContainer getCookieContainer()
    if (_cachedCookieContainer == null || DateTime.Now > _expires)
    // Get the SAML tokens from SPO STS (via MSO STS) using fed auth passive approach
    MsoCookies cookies = getSamlToken();
    if (cookies != null && !string.IsNullOrEmpty(cookies.FedAuth))
    // Create cookie collection with the SAML token
    _expires = cookies.Expires;
    CookieContainer cc = new CookieContainer();
    // Set the FedAuth cookie
    Cookie samlAuth = new Cookie("FedAuth", cookies.FedAuth)
    Expires = cookies.Expires,
    Path = "/",
    Secure = cookies.Host.Scheme == "https",
    HttpOnly = true,
    Domain = cookies.Host.Host
    cc.Add(samlAuth);
    if (_useRtfa)
    // Set the rtFA (sign-out) cookie, added march 2011
    Cookie rtFa = new Cookie("rtFA", cookies.rtFa)
    Expires = cookies.Expires,
    Path = "/",
    Secure = cookies.Host.Scheme == "https",
    HttpOnly = true,
    Domain = cookies.Host.Host
    cc.Add(rtFa);
    _cachedCookieContainer = cc;
    return cc;
    return null;
    return _cachedCookieContainer;
    public CookieContainer CookieContainer
    get
    if (_cachedCookieContainer == null || DateTime.Now > _expires)
    return getCookieContainer();
    return _cachedCookieContainer;
    private MsoCookies getSamlToken()
    MsoCookies ret = new MsoCookies();
    try
    var sharepointSite = new
    Wctx = office365Login,
    Wreply = _host.GetLeftPart(UriPartial.Authority) + "/_forms/default.aspx?wa=wsignin1.0"
    //get token from STS
    string stsResponse = getResponse(office365STS, sharepointSite.Wreply);
    // parse the token response
    XDocument doc = XDocument.Parse(stsResponse);
    // get the security token
    var crypt = from result in doc.Descendants()
    where result.Name == XName.Get("BinarySecurityToken", wsse)
    select result;
    // get the token expiration
    var expires = from result in doc.Descendants()
    where result.Name == XName.Get("Expires", wsu)
    select result;
    ret.Expires = Convert.ToDateTime(expires.First().Value);
    HttpWebRequest request = createRequest(sharepointSite.Wreply);
    byte[] data = Encoding.UTF8.GetBytes(crypt.FirstOrDefault().Value);
    using (Stream stream = request.GetRequestStream())
    stream.Write(data, 0, data.Length);
    stream.Close();
    using (HttpWebResponse webResponse = request.GetResponse() as HttpWebResponse)
    // Handle redirect, added may 2011 for P-subscriptions
    if (webResponse.StatusCode == HttpStatusCode.MovedPermanently)
    HttpWebRequest request2 = createRequest(webResponse.Headers["Location"]);
    using (Stream stream2 = request2.GetRequestStream())
    stream2.Write(data, 0, data.Length);
    stream2.Close();
    using (HttpWebResponse webResponse2 = request2.GetResponse() as HttpWebResponse)
    ret.FedAuth = webResponse2.Cookies["FedAuth"].Value;
    ret.rtFa = webResponse2.Cookies["rtFa"].Value;
    ret.Host = request2.RequestUri;
    else
    ret.FedAuth = webResponse.Cookies["FedAuth"].Value;
    ret.rtFa = webResponse.Cookies["rtFa"].Value;
    ret.Host = request.RequestUri;
    catch (Exception ex)
    return null;
    return ret;
    static HttpWebRequest createRequest(string url)
    HttpWebRequest request = HttpWebRequest.Create(url) as HttpWebRequest;
    request.Method = "POST";
    request.ContentType = "application/x-www-form-urlencoded";
    request.CookieContainer = new CookieContainer();
    request.AllowAutoRedirect = false; // Do NOT automatically redirect
    request.UserAgent = userAgent;
    return request;
    private string getResponse(string stsUrl, string realm)
    RequestSecurityToken rst = new RequestSecurityToken
    RequestType = WSTrustFeb2005Constants.RequestTypes.Issue,
    AppliesTo = new EndpointAddress(realm),
    KeyType = WSTrustFeb2005Constants.KeyTypes.Bearer,
    TokenType = Microsoft.IdentityModel.Tokens.SecurityTokenTypes.Saml11TokenProfile11
    WSTrustFeb2005RequestSerializer trustSerializer = new WSTrustFeb2005RequestSerializer();
    WSHttpBinding binding = new WSHttpBinding();
    binding.Security.Mode = SecurityMode.TransportWithMessageCredential;
    binding.Security.Message.ClientCredentialType = MessageCredentialType.UserName;
    binding.Security.Message.EstablishSecurityContext = false;
    binding.Security.Message.NegotiateServiceCredential = false;
    binding.Security.Transport.ClientCredentialType = HttpClientCredentialType.None;
    EndpointAddress address = new EndpointAddress(stsUrl);
    using (WSTrustFeb2005ContractClient trustClient = new WSTrustFeb2005ContractClient(binding, address))
    trustClient.ClientCredentials.UserName.UserName = _username;
    trustClient.ClientCredentials.UserName.Password = _password;
    Message response = trustClient.EndIssue(
    trustClient.BeginIssue(
    Message.CreateMessage(
    MessageVersion.Default,
    WSTrustFeb2005Constants.Actions.Issue,
    new RequestBodyWriter(trustSerializer, rst)
    null,
    null));
    trustClient.Close();
    using (XmlDictionaryReader reader = response.GetReaderAtBodyContents())
    return reader.ReadOuterXml();

  • Issue with opening PDF file link from Safari

    Hi Everyone,
    I got a problem with opening PDF file link from Safari 4.04. Instead of getting a normal pdf content, it shows some weird characters. Not sure it is something wrong with Adobe Reader Plugin or Safari?
    I have uploaded a screenshot of the issue in the adobe forum (http://forums.adobe.com/thread/531870). Please help!
    Many Thanks,
    John

    There's nothing wrong, except the fact that you have Adobe Reader installed. You don't need it, so get rid of it; it will only cause problems with Safari. What you're seeing is the contents of the PDF file, rather than having it displayed.
    If you want to download a PDF file, you can either Control-click on the link and choose "Download Linked File As…", or you can Option-click on the link for the file and it will be downloaded to your Download folder (usually your Desktop).
    If you want to view a PDF file in Safari, you don't need Adobe Reader; Safari is perfectly capable of doing this by itself and has been for years. Adobe Reader will only get in the way and slow everything down.

  • Best way to download large files direct to disk?

    Hi,
    I am writing a process that will download a file (in the
    background, no GUI interaction) and will save it onto the users
    drive. Once it is saved to disk they will be notified.
    I don't want to use FileReference as that prompts the user, I
    also don't want to just use UrlStream direct into a ByteArray
    because the files can be quite big and I don't want to hog memory.
    What would you recommend I do? Is the only option to simply
    do an urlstream.readBytes() into a smaller temporary ByteArray and
    then immediately write those bytes to disk, rather than appending
    to an overall larger byte array that only gets written once the
    entire file is saved?

    I think it might be your lucky day, I think I just saw the
    article you need.....
    http://jarinheit.com/2008/06/19/downloading-large-files-in-adobe-air-with-flex/
    ....you didn't say what you wanted to do it in and well Im
    trying to learn JS and all this so I converted it....
    quote:
    <html>
    <head>
    <script src="AIRAliases.js" />
    <script>
    var urlString = "
    http://www.adobe.com/lib/com.adobe/template/gnav/adobe-hq.png";
    var urlReq = new air.URLRequest(urlString);
    var urlStream = new air.URLStream();
    var fileStream = new air.FileStream();
    urlStream.addEventListener(air.Event.COMPLETE, loaded);
    urlStream.addEventListener(air.ProgressEvent.PROGRESS,
    writeFile);
    var file =
    air.File.desktopDirectory.resolvePath("testing.png");
    fileStream.openAsync(file, air.FileMode.WRITE);
    urlStream.load(urlReq);
    function writeFile(event) {
    // only write every 50k or so downloaded
    if (urlStream.bytesAvailable > 51200) {
    // Read the buffer into a ByteArray and write it to disk
    var data = new air.ByteArray();
    urlStream.readBytes(data, 0, urlStream.bytesAvailable);
    fileStream.writeBytes(data, 0, data.length);
    function loaded(event) {
    // Write any remaining data to the file before closing it
    var data = new air.ByteArray();
    urlStream.readBytes(data, 0, urlStream.bytesAvailable);
    fileStream.writeBytes(data, 0, data.length);
    fileStream.close();
    </script>
    </head>
    <body>
    </body>
    </html>
    ...and it downloads it in the background.
    Hope it helps.

  • After some running time I cannot download large files via any browser.

    I am running OS X 10.9.2 on a 27inch iMac 2013 model.
    If I keep it running (without sleeping) for some time, perhaps a week, I can no longer download any large files via any browser. It will start and after a very short time go down to 0 B/s, stall there and at the end aboft with an "Unknown network error" or something similar.
    Has anyone seen similar problems?

    Open router set up using http://192.168.1.1  .....you will see username & password .....leave username blank & in password use admin...............
    Click status tab..........check firmware version .......download the latest firmware from http://linksys.com/download ..........
    Udate the firmware ....reset the router for 20-30 seconds ........ later on reconfigure the router ........

  • I need help with controlling two .swf's from third.

    Hi, thanks for reading!
    I need help with controlling two .swf's from third.
    I have a problem where I need to use a corporate designed
    .swf in a digital signage solution, but have been told by the legal
    department that it can not be modified in any way, I also can't
    have the source file yada yada. I pulled the .swfs from their
    website and I decompiled them to see what I was up against.
    The main swf that I need to control is HCIC.swf and the
    problem is it starts w/ a preloader, which after loading stops on a
    frame that requires user input (button press) on a play button,
    before the movie will proceed and play through.
    What I have done so far is to create a container swf,
    HCIC_container.swf that will act as Target for the HCIC.swf, and
    allow me to send actionscript to the file I'm not allowed to
    modify.
    I managed to get that done with the help of someone on
    another forum. It was my hope that the following script would just
    start HCIC.swf at a frame past the preloader and play button, and
    just play through.
    var container:MovieClip = createEmptyMovieClip("container",
    getNextHighestDepth());
    var mcLoader:MovieClipLoader = new MovieClipLoader();
    mcLoader.addListener(this);
    mcLoader.loadClip("MCIC.swf", container);
    function onLoadInit(mc:MovieClip) {
    mc.gotoAndPlay(14);
    But unfortunately it didn't solve my problem. Because there
    is a media-controller.swf, that is being loaded by HCIC.swf that
    has the controls including the play button to start HCIC.swf.
    Here's a link to a .zip file with all 3 .swf files, and all 3
    .fla files.
    http://www.axiscc.com/temp/HCIC.zip
    What I need to do is automatically start the HCIC.swf file
    bypassing the pre-loader and play button without editing it or the
    media-controller.swf in anyway. So all the scripting needs to be
    done in HCIC_container.swf.
    I know this is confusing, and its difficult to explain, but
    if you look at the files it should make sense.
    ActionScripting is far from my strong point, so I'm
    definitely over my head here.
    Thanks for your help.

    Got my solution on another forum.
    http://www.actionscript.org/forums/showthread.php3?t=146827

  • Trying to set up MG5420 for my Samsung galaxy 2 tab 10.1. Help with download? Thanks

    Trying to setup MG5420 for my samsung galaxy 2 tab 10.1  help with download.  thanks 

    Hello bvick.
    Printing can be performed with our Easy PhotoPrint app or by using Google Cloud Print.  The Easy PhotoPrint app is available for free from Google Play.
    For information on using the printer with the Google Cloud Print service, please visit the following link:
    http://www.usa.canon.com/cusa/consumer/products/printers_multifunction/photo_all_in_one_inkjet_print...
    Once there, type in 'Google Cloud' to search for the guide on this service.
    Did this answer your question? Please click the Accept as Solution button so that others may find the answer as well.

  • Can I download large files a bit at a time

    I'm on dialup and I'm wondering if it is possible to download large files, such as security updates, in small bits like you can do from a P2P network.
    Can I adjust a preference, download a utility, buy some additional software?
    Thanks in advance for any suggestions.
    G5 iSight   Mac OS X (10.4.2)  

    Thanks Niel for the link. I downloaded that program, and then, knowing what to look for, located a few others as well.
    I'm sure they all will allow me to download large files, but how do I get these programs to press the button that says "Download". I go to the page that has the "Download" button, copy the web address for that page, paste it into the program, tell it to download, but of course all it does is copy the page.
    I know there must be an easy way to do it, but after a few hours of trying I can't fathom it.
    How do you find the web address of the actual file?

Maybe you are looking for

  • Security issue in Business Rule

    Hi All, I've one user who is provisioned for business rules in shared services. I can see the user in Essbase user list. But when I try to assign the user to a business rule, I don't see that user in the "Add user" pop up box. There are total 121 ess

  • Update Error #U41M1C212 on Flash CS5

    Hi, I click on update for flash CS5 I get error msg #U41M1C212 The error says, "The update server is not responding. The server might be offline temporarily, or the internet or firewall settings may be incorrect. Please try again later. Error Code U4

  • Acrobat Pro 9 Extended Will Not Recognize My Dell 3115cn Scanner

    I recently upgraded from Acrobat 8 running on 32-Bit Windows XP to Acrobat Pro 9 Extended running on 64-Bit Windows 7.  When I attempt to create a PDF document from my scanner, I get the "The Unit Chosen Is Not Supported" error Message.  There seems

  • Still says trial has ended even though I purchased a supscriction

    Purchased a subscription after my trial ended. Still says my trail is over and won't let me continue using Premiere. When I try to start it, I'm asked for my serial number. Any thoughts?

  • Changing colour hue on camera - faces look reddish

    is it possible to change the colour hue on the front camera as faces (its sole use) come across as reddish in hue.