Copyright 2011-01-06 Werner Randelshofer

ch.randelshofer.media.tiff
Class ASCIIValueFormatter

java.lang.Object
  extended by ch.randelshofer.media.tiff.ASCIIValueFormatter
All Implemented Interfaces:
ValueFormatter

public class ASCIIValueFormatter
extends java.lang.Object
implements ValueFormatter

Formats byte arrays as string.

Version:
1.0 2010-03-22 Created.
Author:
Werner Randelshofer

Constructor Summary
ASCIIValueFormatter()
          Creates a new enumeration.
 
Method Summary
 java.lang.String descriptionFormat(java.lang.Object data)
          Describes the data.
 java.lang.Object format(java.lang.Object value)
          Formats the specified value.
 java.lang.Object prettyFormat(java.lang.Object value)
          Formats the specified value in a human readable format.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ASCIIValueFormatter

public ASCIIValueFormatter()
Creates a new enumeration. The enumeration consists of a list of String=Integer pairs.

Method Detail

format

public java.lang.Object format(java.lang.Object value)
Description copied from interface: ValueFormatter
Formats the specified value. If the value is of the desired type, it is replaced by an object which can be handled easier. For example, an integer value by a descriptive String.

Specified by:
format in interface ValueFormatter

prettyFormat

public java.lang.Object prettyFormat(java.lang.Object value)
Description copied from interface: ValueFormatter
Formats the specified value in a human readable format.

Specified by:
prettyFormat in interface ValueFormatter

descriptionFormat

public java.lang.String descriptionFormat(java.lang.Object data)
Description copied from interface: ValueFormatter
Describes the data. Returns null if no description is available.

Specified by:
descriptionFormat in interface ValueFormatter

Copyright 2011-01-06 Werner Randelshofer