Servertec   Codecs
Content
Introduction
Release Notes
Features
FAQs
Requirements
Installation
Add-ons
How To
Change Log
Future Plans
Knowledge Base
Documentation
Conventions
Users
Reference
iServer API
AccessLogEntry
Codecs
Connection
ConnectionPool...
DString
ErrorLogEntry
EventLogEntry
FileCache
FileUpload
IOHandler
IOManager
iws
Logger
MultiPartForm
QuickSort
QuickSortString...
Realm
RealmAdmin...
RealmManager
ServletContextImpl
ServletContext...
ServletImpl
ServletManager
Utils

Servlet API
CGI
SSI
Servlets
Config Files
Log Files
Classes
Directory Tree

Samples
Sales
Legal
Feedback

 

java.lang.Object
 |
 +--stec.net.Codecs

public class Codecs

Methods for encoding/decoding text.

Methods

Method Description
base64Decode Decodes the specified Base64 encoded string or byte array.
base64Encode Used to Base64 encoded the given string or byte array.
UUDecode Decodes the specified UUEncoded string or byte array.
UUEncode Used to UUEncode the given string or byte array.

base64Decode

Decodes the specified Base64 encoded string or byte array.

Syntax

public final static String base64Decode(String string)
public final static byte[] base64Decode(byte[] bytearray)

Parameters

string the Base64 encoded string to decode.
bytearray the Base64 encoded array of bytes to decode.

Returns

String the decoded string.
byte[] the decoded array of bytes.

Throws

Nothing

Example

String message = Codecs.base64Decode(encodedMessage);

base64Encode

Used to Base64 encoded the given string or byte array.

Syntax

public final static String base64Encode(String string)
public final static byte[] base64Encode(byte[] bytearray)

Parameters

string the string to encode.
bytearray the array of bytes to encode.

Returns

String the encoded string.
byte[] the encoded array of bytes.

Throws

Nothing

Example

String encodedMessage = Codecs.base64Encode(message);

UUDecode

Decodes the specified UUEncoded string or byte array.

Syntax

public final static String UUDecode(String string)
public final static byte[] UUDecode(byte[] bytearray)

Parameters

string the UUEncoded string to decode.
bytearray the UUEncoded array of bytes to decode.

Returns

String the decoded string.
byte[] the decoded array of bytes.

Throws

Nothing

Example

String message = Codecs.UUDecode(encodedMessage);

UUEncode

Used to UUEncode the given string or byte array.

Syntax

public final static String UUEncode(String string)
public final static byte[] UUEncode(byte[] bytearray)

Parameters

string the string to encode.
bytearray the array of bytes to encode.

Returns

String the encoded string.
byte[] the encoded array of bytes.

Throws

Nothing

Example

String encodedMessage = Codecs.UUEncode(message);
 top of page
 Built with iScript Copyright © 1997-2000 Servertec. All rights reserved.
Last Modified: Thu Aug 10 13:06:59 EDT 2000