package org.ejbca.cvc.internal.tlv;

import java.nio.ByteBuffer;
import java.nio.charset.Charset;

public interface Value {

    /**
     * Get access to a duplicate of the underlying {@link ByteBuffer}.
     * 
     * @return a duplicate of the underlying {@link ByteBuffer}.
     * @see ByteBuffer#duplicate()
     */
    ByteBuffer bytes();

    /**
     * Decodes this value with the provided charset.
     * 
     * @param charset
     *            the charset to decode the value.
     * @return the string representation of this value.
     */
    String asString(Charset charset);

    /**
     * Decodes this value as ascii string.
     * 
     * @return the string representation of this value.
     */
    String asString();

    /**
     * Copies the content of this value into a new byte array.
     * 
     * @return a bytearray with the content of this value.
     */
    byte[] asBytes();

    /**
     * Returns the length of this value.
     * 
     * @return the length of this value.
     */
    int size();

}
@@ -92,16 +92,76 @@
 arset;%0A%0A
+/**%0A * The Value in TLV.%0A * %0A * @author fichtelmannm%0A *%0A */%0A
 public i

add missing javadoc