Tini, URLConnections and the HTTP Protocol

The folks at Dalsemi have removed many of the classes which would make a .tini binary unnecessarily big. I guess it's a feature, but upgrading from version 1.16 to 1.17 was painful because of this.

When creating a URLConnection, you may get a MalformedURLException. The javadocs for the URL class explain this happens when the protocol is unknown. Hmmm, HTTP is unknown? This suggests that the classes that can handle HTTP are missing.

To fix this, add the following classes to your .tini:

  • com.dalsemi.protocol.http.Connection
  • com.dalsemi.protocol.http.HTTPClient
  • com.dalsemi.protocol.BasicClient
  • com.dalsemi.protocol.HeaderManager
  • com.dalsemi.protocol.DefaultFileNameMap
  • com.dalsemi.protocol.http.HTTPOutputStream

They can all be found in the modules.jar archive which is distributed with the tini1.17 SDK.

Tagged as: howto, java, http, tini
Fork me on GitHub