Determining remote file size.

Hi All,
I have written a program that downloads file resources across the internet using URL's. Stream based communications via URL allow me to download files however I am wondering if there is actually a way of determining the size of the file on the server side. Obviously I can determine file size on my system once the file is downloaded, however I want to be doubly shore that files are successfully downloading by first determining the size of the file on the server and then checking that file size against the file size on my computer. This has become necessary because occasionally files are downloading incorrectly and Exceptions are not being thrown in those instances.
Regards
Davo

JProg,
I am relatively new to programming so I am having some
conceptual difficulties with your suggestion, it
sounds really good, but I can't honestly say that I
understand this fully.
When you say "dump a java class on the server that
will serve as a local file metadata querier" I am a
little stumped. I have a basic understanding of what a
metadata querier is (basically something that gets
info off the server for you) however there are two
things that I would appreciate help with:
1). How does one go about dumping a java class onto
the server?
2). What class would one use?
If you can provide any help with these two points it
will be greatly appreciated. Thanks for the advice so
far.
Regards
Davo
What I meant is create a Java Class that queries File MetaData. Compile it, then put it on the server.
Create an RMI server on the server-side that you would use as a proxy for this class.
From the client-side, call the proxy via the RMI Stubs that were generated when you compiled rmi server. Pass the file name, the stub will send the filename to the querier proxy that serves as RMI server, then this proxy will call the actual file meta data querier passing to it the filename, get the metadata in return, and sends them back to the client.

Similar Messages

  • HT1222 how do i determine the file size of each download before i download it?

    How do i determine the file size of a down load before i download it?

    I have checked the update page and even checked more and can find no reference to file size.  I'm using a hotspot and some of the downloads cause me to go over my limit and incur extra charges.  I apperciate your help.

  • Problem with CS2 edit file size

    When I create a new version of a 3-4mb original, make a few simple modifications in CS2 and save back to Aperture the resulting version is almost 70mb. If I export this version from Ap back to my desktop and check file size it is back to near the original size. Yet, when I check the file size stored in my Ap library, it is 70mb. This will fill my hard drive in a hurry! Can someone help explain this ??

    I did a little more experimenting by making external edits in PS on a 3.9mb JPG file in both Aperture and Lightroom to see what the resulting file sizes were. In both cases I left the master outside the library so that I could see file additions in both the application library and in the folder containing the originals and revisions. I looked into the file directories to determine real file sizes rather than relying on info from the applications. The increase in library file size was small in both apps. However, there was a significant difference in the revised file size between Aperture & Lightroom in the folders containing the originals. The best I could do in Aperture produced a 24.6mb psd revised file, which showed as a version in the App., in addition to the master. Lightroom gives the option to revise the master or revise a copy of the master when exporting. When revising a copy of the master, the result was a new jpg file approximately the same size as the master - 3.9mb - which appeared as a version. This is what I would like to be able to do in Aperture.
    I have been using PS for several years for all my photo enhancements and have developed a pretty comfortable and effective routine. Having used Aperture for a couple of months now, I can see that most minor edits can be done more easily in Aperture, but the same is true of Lightwell. Although I would probably only use PS on less than 25% of my keeper photos, this increased storage requirement seems more trouble than the advantages of Aperture vs Lightroom are worth. Maybe Apple will make a change in the next revision that will effect this situation and make Aperture more desirable for JPG shooters.
    Thanks Again,
    Bob

  • Impact of data file size on DB performance

    Hi,
    I have a general query regarding size of data files.
    Considering DB performance, which of the below 2 options are better?
    1. Bigger data file size but less number of files (ex. 2 files with size 8G each)
    2. Smaller data file size but more number of files (ex. 8 files with size 2G each)
    I am working on a DB where I have noticed where very high I/O.
    I understand there might be many reasons for this.
    However, I am checking for possibility to improve DB performance though optimizing data file sizes. (Including TEMP/UNDO table spaces)
    Kindly share your experiences with determining optimal file size.
    Please let me know in case you need any DB statistics.
    Few details are as follows:
    OS: Solaris 10
    Oracle: 10gR2
    DB Size: 80G (Approx)
    Data Files: UserData - 6 (15G each), UNDO - 2 (8G each), TEMP - 2 (4G each)
    Thanks,
    Ullhas

    Ullhas wrote:
    I have a general query regarding size of data files.
    Considering DB performance, which of the below 2 options are better?Size or number really does not matter assuming other variables constant. More files results in more open file handles, but in your size db, it matters not.
    I am working on a DB where I have noticed where very high I/O.
    I understand there might be many reasons for this.
    However, I am checking for possibility to improve DB performance though optimizing data file sizes. (Including TEMP/UNDO table spaces)Remember this when tuning I/O: The fastest I/O is the one that never takes place! High I/O may very well be a symptom of unnecessary FTS or poor execution plans. Validate this first before tuning I/O and you will be much better off.
    Regards,
    Greg Rahn
    http://structureddata.org

  • Lightroom, Photoshop, Image and File Size | Adobe Evangelists - Julieanne Kost | Adobe TV

    In this episode of The Complete Picture, Julieanne explains how LIghtroom determines the file size and resolution of a file when using the Edit in Photoshop command.
    http://adobe.ly/YasSCQ

    Have you tried, emptying your cache in your browser?  Also, try a different browser ie chrome, safari, firefox.  If your problem persists please send me an email with a detailed systme configuration spec to [email protected] and we can investigate offlist further. 
    Thanks!
    Mike Burton
    Adobe TV Administrator

  • File size mystery

    I have a video I want to put into an iPad app.
    The footage and sequence are 1920 x 1080 pixels (was shot on a Canon Vixia if that matters).
    File size is a big issue because the Digital Publishing Suite cannot handle big files.
    I have tried making the file smaller pixel dimensions in order to bring the file size down, but I get the same size file no matter what pixel dimensions I try.
    The only thing that effects file size is bitrate encoding settings.
    What am I missing?
    In Photoshop if I make the photo half the size, but same quality the file gets smaller.
    In Premiere when I make the video half size, the file size stays the same.
    Is this normal?
    Any insight will be greatly appreciated.
    file:///Users/CygVideo2/Desktop/Screen%20shot%202011-09-26%20at%203.15.38%20PM.png
    file:///Users/CygVideo2/Desktop/Screen%20shot%202011-09-26%20at%203.16.11%20PM.png

    The only thing that effects file size is bitrate encoding settings.
    That, and the duration of the sequence.  Everything else will have a negligible effect on file size.  And it makes sense if you think about it.  File size is measured in bits.  So bits per second times the number of seconds will determine the file size.

  • Audible Book file size?

    I have not purchased any audible books from ITMS yet. Is there some way to determine the file size that will be downloaded prior to purchase? There may be an obvious way but I haven't been able to find it and I want to get an idea of how much space on my hard drive and ipod I will need.
    Thanks for any help,
    John

    The size of the files will vary depending on the length of the book.
    Here are some example sizes:
    Book 1: split into 4 separate files of 2 to 2.5 hours each. The file sizes vary from 29 to 36 MB.
    Book 2: split into 3 files of 2.25 to 2.5 hours each. The file sizes vary from 31 to 35 MB.

  • PS Touch and able to change file size

    Hi
    I would like to change the file size of a picture from 10 mb to 1 mb, is this possible?
    Thanks in advancefile

    Size in pixels ultimately determines the file size. Tap the ampersand icon in the upper right > Image Size. (If you need a file size calculator, try Googling. There are tons of online tools out there.)

  • Reducing the file size Pages

    I am trying to reduce the file size of a document in Pages. It has many jpegs. When I use File>Reduce File Size or Format>Image>Reduce File Size, I get stuck at "Determining potential file size reduction ..." and it will go no further. Selecting "Cancel" or "Reduce" has no effect. I need to to a forced quit to get anywhere. Thanks

    To use the Reduce file size isn't the best way to do it but the easiest if it works. You probably have an image clogging the process.
    Instead reduce the image sizes in a graphical application suited for it. Do the cropping of the images first if you haven't done that already. Then down size the resolution to about 300 dpi if you want to print the document images. If it is only going to show on the screen you can down size the images to about 75 dpi.

  • Album File Size

    What is the best way for me to determine the file size of each of the albums in my collection?

    Quick way for individual albums (though I suspect it's not sufficient for your personal requirements) is to select the album in the Browser and just read off the figure from the bottom of the iTunes window. Otherwise, Tim's suggestions are sound (I would check to see if there's an Applescript for this before you start wrangling Excel :-)).

  • "the remote server returned an error (400) bad request." can't able to upload file size 1 MB

    I cant able to upload the file size >1 MB its showing error."the remote server returned an error (400) bad request."
    any one kindly help to fix the issue.

    Hi,
    Are you trying thru OOB or how..
    Please check the "maximum file size for sharepoint".
    refer below links for the same.
    https://angler.wordpress.com/2012/03/21/increase-the-sharepoint-2010-upload-file-size-limit/
    https://msdn.microsoft.com/en-us/library/ff487972.aspx
    Don't forget to mark it as an Answer if it resolves your problem or Vote Me if it useful.
    Mahesh

  • How to determine binary file data set size

    Hi all
    I am writing specific sets of array data to a binary file, appending each time so the file grows by one data set for each write operation.  I use the set file position function to make sure that I am at the end of the file each time.
    When I read the file, I want to read only the last 25 (or some number) data sets.  To do this, I figured on using the set file position function to place the file position to where it was 25 data sets from the end.  Easy math, right ?  Apparently not.
    Well, as I have been collecting file size data as I have started the initial tet run, I am finding the the file size (using file size command and getting number of bytes as a result) that the size is not growing the same amount every time.  My size and format of my data being written is identical each time, an array of four double precision numbers.
    The increments I get are as follows, after first write - 44 bytes, after 2nd - 52 bytes, 3rd - 52 bytes, 4th 44 bytes, 5th - 52 bytes, 6th - 52 bytes, 7th - 44 bytes and it appears to maintain this pattern going forward.
    Why would each write operation not be identical in size of bytes.  This means that my basic math for determining the correct file poistion to read only the last 25 data sets will not be simple and if somewhere along the line after I have accumulated hundreds or thousands of data sets, what if the pattern changes.
    Any help on why this is occuring or on a method of working around the problem would be much appreciated.
    Thanks
    Doug
    Doug
    "My only wish is that I am capable of learning each and every day until my last breath."
    Solved!
    Go to Solution.

    I have stripped out the DSC module functions from the vi and attached it here.  I also set default values to all the inputs so it will run with no other inputs.  I also included my current data files (zipped as I have four of them) though the file names are hard coded in the vi so they can be changed to whatever works locally. In fact probably will have to be to modified for the path anyway.
    If you point to a path that has no file, it will create a new one on the first run and the file size will show zero since there is no data in it. It will start to show the changes on each subsequent run.
    As I am creating and appending four different files, each with it's own set of data but always the same format (array of four double precision numbers) and the file size information always increments the same for all four files (as will be seen in the File Size Array) I don't think it is a function of the size of the acutal numbers but something idiosyncracy with how the binary file is created.
    If this proves to be a major hurdle I guess I could try a TDM file but I already got everything else working with this one and need to move on to other tasks.
    Thanks for any continued assistance
    Doug
    Doug
    "My only wish is that I am capable of learning each and every day until my last breath."
    Attachments:
    !_Data_Analysis_Simple.vi ‏40 KB
    SPC.zip ‏2 KB

  • Determining File Sizes

    I am involved in a photo contest that allows only minimal cropping of an image entered. Entries are allowed to be cropped no more than 20%, so entered file must be at least 80% of original size. Anybody have any suggestion as to an easy way to figure that out. What I need to know is the file size of the croppped VERSION relative to the original.
    Thanks
    HPL

    OK, I have been trying to determine percent cropped by comparing the total number of pixels (W x H) in the original compared to the cropped version, but I'm still not too sure that I'm doing this correctly. In the "Metadata View: File Info" HUD, I have a line for "Master Pixel Size" (2332 X 3504 in this case) and another line for "Pixel Size" (1704 X 2393 in this case). However, in the "Adjustments HUD" there is a "Crop" section and it is showing the pixel count as 2094 x 3150. I believe that the pixel count in the Adjustments HUD is probably the correct one for this particular crop, but if so, what accounts for the difference between that value, the "Master Pixel Size", and the "Pixel Size"? As cropping more than 20% will result in a DQ and as there is significant money involved in the contest (approx $70,000.00), I really need to get this right.
    I am finding this very confusing. Thanks,
    HPL

  • File size issues with remote workflow

    Hi everyone
    I am currently reviewing InCopy as a tool for our two 24 page full colour quarterly publications and the problem I am currently facing is the design team are claiming the file sizes would be a problem for us to use the remote workflow - how do you guys manage large files over email? Any tips or advise?
    Also, regarding the layout workflow, does it require a large effort from the design team to divide into individual spreads? As this is another issue.
    We currently have a cumbersum process and would like to resolve asap.
    Would greatly appreciate any advise you may be able to offer
    Thanks in advance

    If you are using a remote workflow ... designers are sending off-site editors InCopy Assignment packages (ICAPs) .... then they need to create assignments in order to package them for the remote InCopy user. So there's no need to split up a layout into smaller files or anything.  An assignment is a subset of the INDD file; multiple assignments -- each encompassing different pages or sections -- are created from the same INDD file.
    When the designer creates the assignment, have them turn off "Include original images in packages"; that should keep the file size down.
    Or -- like Bob said -- you can avoid the whole remote workflow/assignment package rigamarole all together by just keeping the file in a project folder in the Dropbox folder on teh designer's local hard drive, and have them share the project folder with the editors. In that workflow, editors open the INDD file on their local computer and check out stories, just as though they were opening them from a networked file server.
    I cover how the InCopy Dropbox workflow works in a tutorial video (within the Remote Workflows chapter) on Lynda.com here:
    http://www.lynda.com/tutorial/62220
    AM

  • File Adapter determining file size

    I have added a Header Variable to my Receive activity so that I can capture the size of the file coming in. I've also added a "size" element to the InboundFileHeader.wsdl.
    I can't figure out how to populate that header variable! I was hoping it would just be populated automatically since I've added the element to the wsdl but no such luck, just null variables.
    Thanks.

    In 10.1.3.1 it does shows up as header variable, but fileadapter wsdl file has only filename and directory name as element.
    I have not tried to modify adapter wsdl file, but here is little hacky way to get the size:
    Let's your header variable is Variable_FileHeader, please defined two string variables naemd Variable_Header_String and Variable_Size, and doing following assign operation you should be able to get the file size.
    <copy>
    <from expression="ora:getContentAsString(bpws:getVariableData('Variable_FileHeader','/ns3:InboundFileHeaderType'))"/>
    <to variable="Variable_Header_String"/>
    </copy>
    <copy>
    <from expression="substring-before(substring-after(bpws:getVariableData('Variable_Header_String'),'&lt;size>'),'&lt;/size>')"/>
    <to variable="Variable_Size"/>
    </copy>
    HTH,
    Chintan

Maybe you are looking for