Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 8 of 8

Thread: Retrieving Meta-Data from a File

  1. #1
    Junior Member
    Join Date
    Jun 2009
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Retrieving Meta-Data from a File

    Hello everyone, id like to know how to retrieve the meta-data a file contains. Ive managed to retrieve some, like Name of File, Size, Path, isHidden, Icon, etc.

    But i still need more data, and can't find the methods to retrieve them. Im working with .TIF files. This is everything i need:

    Title [CHECK]
    Author
    Description
    Resolution X
    Resolution Y
    Dimensions
    Size [CHECK]
    Date/Time of Creation
    Date/Time of last modification
    Monocromatic / Color
    Bits in the Color Pallete


  2. #2
    Super Moderator Json's Avatar
    Join Date
    Jul 2009
    Location
    Warrington, United Kingdom
    Posts
    1,274
    My Mood
    Happy
    Thanks
    70
    Thanked 156 Times in 152 Posts

    Default Re: Retrieving Meta-Data from a File

    I take it you've had a look at the spec?

    http://partners.adobe.com/public/dev...tiff/TIFF6.pdf

    // Json

  3. #3
    Junior Member
    Join Date
    Jun 2009
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Retrieving Meta-Data from a File

    Quote Originally Posted by Json View Post
    I take it you've had a look at the spec?

    http://partners.adobe.com/public/dev...tiff/TIFF6.pdf

    // Json
    Hey, i read some of that, and i dont want to sound rude or dumb, but i dont understand how that answers my question....

  4. #4
    Super Moderator Json's Avatar
    Join Date
    Jul 2009
    Location
    Warrington, United Kingdom
    Posts
    1,274
    My Mood
    Happy
    Thanks
    70
    Thanked 156 Times in 152 Posts

    Default Re: Retrieving Meta-Data from a File

    Well the TIFF spec tells you where the information is stored in the file itself, I thought you were trying to implement your own TIFF reader so to speak. Are you just after some java library that will do it for you?

    // Json

  5. #5
    Junior Member
    Join Date
    Jun 2009
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Retrieving Meta-Data from a File

    Quote Originally Posted by Json View Post
    Well the TIFF spec tells you where the information is stored in the file itself, I thought you were trying to implement your own TIFF reader so to speak. Are you just after some java library that will do it for you?

    // Json
    I thought there was a library that would do the job, not just for TIFF files but files in general, i suppose there isnt one.

    Quote Originally Posted by Json;8714[B
    Well the TIFF spec tells you where the information is stored in the file itself[/B]
    Can you tell me exactly where? is it the part where it says Byte 0 - 1, 2-3, etc? I really dont understand much....

  6. #6
    Super Moderator Json's Avatar
    Join Date
    Jul 2009
    Location
    Warrington, United Kingdom
    Posts
    1,274
    My Mood
    Happy
    Thanks
    70
    Thanked 156 Times in 152 Posts

    Default Re: Retrieving Meta-Data from a File

    How about you grab a hold of this jar file.

    /com/drewnoakes/metadata-extractor/2.4.0-beta-1/ - Maven Repository Browser - Jarvana

    You need metadata-extractor-2.4.0-beta-1.jar and in it there will be a class called something like TiffMetadataReader

    Enjoy!

    // Json

  7. #7
    Junior Member
    Join Date
    Jun 2009
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Retrieving Meta-Data from a File

    Quote Originally Posted by Json View Post
    How about you grab a hold of this jar file.

    /com/drewnoakes/metadata-extractor/2.4.0-beta-1/ - Maven Repository Browser - Jarvana

    You need metadata-extractor-2.4.0-beta-1.jar and in it there will be a class called something like TiffMetadataReader

    Enjoy!

    // Json
    Thanks, but am is supposed to install or include that class in my current libraries? Im a little confused because i downloaded the jar file and when i try to run it, nothing happens.

  8. #8
    Super Moderator Json's Avatar
    Join Date
    Jul 2009
    Location
    Warrington, United Kingdom
    Posts
    1,274
    My Mood
    Happy
    Thanks
    70
    Thanked 156 Times in 152 Posts

    Default Re: Retrieving Meta-Data from a File

    You put it in your lib folder of your application or where ever you store your external jars. Just make sure its on the classpath when you run your own application.

    // Json

Similar Threads

  1. About META-INF directory?
    By chinni in forum Java Servlet
    Replies: 2
    Last Post: February 9th, 2010, 10:36 AM
  2. Replies: 8
    Last Post: January 6th, 2010, 09:59 AM
  3. Read data from text file
    By yroll in forum Algorithms & Recursion
    Replies: 4
    Last Post: December 31st, 2009, 01:40 AM
  4. problem in retrieving data via RMS
    By solaleh in forum Java ME (Mobile Edition)
    Replies: 0
    Last Post: August 30th, 2009, 05:46 AM
  5. Virutal File Directory from Given dAta
    By hugsheals in forum JavaServer Pages: JSP & JSTL
    Replies: 0
    Last Post: July 28th, 2009, 03:39 AM