edu.vt.middleware.crypt.util
Interface Converter

All Known Implementing Classes:
AbstractEncodingConverter, Base64Converter, HexConverter

public interface Converter

Interface describing conversion of bytes to string and vice versa.

Version:
$Revision: 3 $
Author:
Middleware Services

Method Summary
 String fromBytes(byte[] input)
          Converts a byte array to a formatted/encoded string.
 String fromBytes(byte[] input, int offset, int length)
          Converts a byte array to a formatted/encoded string.
 byte[] toBytes(String input)
          Converts a formatted/encoded string to raw bytes.
 

Method Detail

fromBytes

String fromBytes(byte[] input)
Converts a byte array to a formatted/encoded string.

Parameters:
input - Input bytes.
Returns:
Formatted/encoded string derived from input bytes.

fromBytes

String fromBytes(byte[] input,
                 int offset,
                 int length)
Converts a byte array to a formatted/encoded string.

Parameters:
input - Input bytes.
offset - Offset into input bytes at which to begin processing.
length - Number of bytes of input data to process.
Returns:
Formatted/encoded string derived from input bytes.

toBytes

byte[] toBytes(String input)
Converts a formatted/encoded string to raw bytes.

Parameters:
input - Formatted/encoded input string.
Returns:
Byte array corresponding to input string.


Copyright © 2003-2011 Virginia Tech. All Rights Reserved.