Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7597059
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T22:04:26+00:00 2026-05-30T22:04:26+00:00

Recently I’ve implemented an application in Java that uses the Google Docs API v3.0

  • 0

Recently I’ve implemented an application in Java that uses the Google Docs API v3.0. New entries are created like this:

DocumentListEntry newEntry = new  DocumentListEntry();
newEntry.setFile(file, Common.resolveMimeType(file)); //Common is a custom class
newEntry.setFilename(entryTitle.getPlainText()); //entryTitle is a TextConstruct
newEntry.setTitle(entryTitle); 
newEntry.setDraft(false);
newEntry.setHidden(file.isHidden());
newEntry.setMd5Checksum(Common.getMD5HexDigest(file));

Trust me when I tell you that Common.getMD5HexDigest(file) returns a valid and unique MD5 Hexadecimal hash.

Now, the file uploads properly yet when retrieving the file and checking the MD5 checksum through the entry.getMd5Checksum() method, it always returns null.

I’ve tried EVERYTHING, even set the ETag, ResourceID and VersionID but they all get override with default values (null or server generated strings).

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T22:04:28+00:00Added an answer on May 30, 2026 at 10:04 pm

    After struggling a few weeks with the MD5 checksum problem (to verify if the content of the file changed over time), I came up with a solution that doesn’t rely on the MD5 checksum of the file but on the client last-update attribute of the file.

    This solution goes to everyone that wants to check if a file has changed over time. However, “an update” on any operating system can be considered as the act of opening the file and saving the file, with or without making any changes to the content of the file. So, it’s not perfect but does save some time and bandwidth.

    Solution:

    long lastModified = new DateTime(
        new Date(file.lastModified()), TimeZone.getDefault()
    ).getValue();
    
    if(lastModified > entry.getUpdated().getValue()) {
        //update the file
    }
    

    Where file is a File instance of the desired file and entry is the DocumentListEntry associated to the local file.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Recently I ran into this error in my web application: java.lang.OutOfMemoryError: PermGen space It's
Recently I bought a new android tablet (a no-name Chinese tablet), and I'd like
Recently I found about this tool easy_install that help me to easy install additional
Recently my application received quite a lot comments that it's not working on Android
Recently we got a new server at the office purely for testing purposes. It
Recently I'm doing some work on RTMP streaming, that is using Flowplayer to integrate
Recently I've noticed that on occasion I do not get a mayorship notification when
Recently I have been dealing with windows LogonUser API. The LogonUser api returns different
Recently I've begun to code in Objective-C for iOS 5 devices. My brand new
Recently, we discovered odd behavior in some old code. This code has worked for

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.