com.wewebu.ow.server.util.paramcodec
Class OwAlphabetCoder

java.lang.Object
  extended by com.wewebu.ow.server.util.paramcodec.OwAlphabetCoder

public class OwAlphabetCoder
extends Object

Encodes a long value in a numeric base given by the length of given alphabet.

Alfresco Workdesk
Copyright (c) Alfresco Software, Inc.
All rights reserved.

For licensing information read the license.txt file or
go to: http://wiki.alfresco.com

Since:
3.0.0.0

Constructor Summary
OwAlphabetCoder()
          Constructor The DEFAULT_ALPHABET will be used
OwAlphabetCoder(char[] alphabet_p)
          Constructor
 
Method Summary
 String encode(long aLong_p)
          Encodes the given long in a numeric base given by the length of the alphabet.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OwAlphabetCoder

public OwAlphabetCoder()
Constructor The DEFAULT_ALPHABET will be used


OwAlphabetCoder

public OwAlphabetCoder(char[] alphabet_p)
Constructor

Parameters:
alphabet_p - char array alphabet
Method Detail

encode

public String encode(long aLong_p)
              throws OwInvalidOperationException
Encodes the given long in a numeric base given by the length of the alphabet.

Parameters:
aLong_p - a positive long value
Returns:
the encoded String value
Throws:
OwInvalidOperationException - if the given long value is negative


Copyright © 2013 Alfresco Business Solutions. All Rights Reserved.