12

What is the purpose of the classes in this package?

I want to use Base64 encoding in my app. As I'm typing away in Eclipse, I am prompted if I want to import a class called "com.google.appengine.repackaged.com.google.common.util.Base64"

I can't find any documentation about what this class does. No javadoc, or no mention in the Google App Engine manual (that I can see). Is this some kind of "hidden" API that I'm not supposed to have access to?

readonly
  • 343,444
  • 107
  • 203
  • 205
bpapa
  • 21,409
  • 25
  • 99
  • 147
  • It appears to me that there is no good Base64 encoding in the standard GAE/J libraries (I find this a bit odd). I guess the best options are apache.commons.codec or guava. – Tom Feb 28 '13 at 17:35

1 Answers1

12

Is this some kind of "hidden" API that I'm not supposed to have access to?

Yes.

The purpose of repackaging Java classes is to have a private copy of a library that otherwise might conflict with another version of that some library (that the application developer adds to his project as a jar file).

It is one possible answer to JAR-hell.

Even the JDK makes use of this mechanism, e.g. with com.sun.org.apache.xerces which is an XML parsing library developed by the Apache Project that Sun choose to include (repackaged).

Do not call these classes directly. (You could, and they would probably work okay, but as they are not part of the official API, they could disappear in the next version).

Thilo
  • 257,207
  • 101
  • 511
  • 656
  • 1
    You can hide those packages from showing up in Eclipse auto complete by doing: http://stackoverflow.com/questions/5538714/how-to-hide-some-eclipse-autocomplete-results – Adam Gent Mar 23 '13 at 21:52