it.could.util.encoding
Interface Encodable

All Superinterfaces:
EncodingAware
All Known Implementing Classes:
Location, Location.Authority, Location.Schemes, Parameters, Parameters.Parameter, Path, Path.Element

public interface Encodable
extends EncodingAware

The Encodable interface describes an Object whose String representation can vary depending on the encoding used.

Author:
Pier Fumagalli

Field Summary
 
Fields inherited from interface it.could.util.encoding.EncodingAware
DEFAULT_ENCODING, PLATFORM_ENCODING
 
Method Summary
 String toString()
          Return the String representation of this instance.
 String toString(String encoding)
          Return the String representation of this instance given a specific character encoding.
 

Method Detail

toString

public String toString()

Return the String representation of this instance.

This method is equivalent to a call to toString(DEFAULT_ENCODING)


toString

public String toString(String encoding)
                throws UnsupportedEncodingException

Return the String representation of this instance given a specific character encoding.

Throws:
UnsupportedEncodingException - if the specified encoding is not supported by the platform.