com.izzyway.util
Class BubbleBabble

java.lang.Object
  extended by com.izzyway.util.BubbleBabble

public class BubbleBabble
extends java.lang.Object

Bubble Babble Binary Data Encoding

 See http://en.wikipedia.org/wiki/Bubble_Babble for details.

 Copyright 2011 Izzyway - http://izzyway.com/

 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
 the Free Software Foundation, either version 3 of the License, or
 any later version.

 This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.

 You should have received a copy of the GNU General Public License
 along with this program.  If not, see http://www.gnu.org/licenses/.

 Based on :
  - Php Library:  http://svn.kd2.org/svn/misc/libs/bubble-babble/bubble_babble.php


Constructor Summary
BubbleBabble()
           
 
Method Summary
 void decode(java.io.Reader reader, java.io.OutputStream out)
          Decode the input data
 java.lang.String decode(java.lang.String src)
          Decode the String input
 void encode(java.io.InputStream src, java.io.Writer out)
          Encode the input data
 java.lang.String encode(java.lang.String src)
          Encode the input String
 boolean isEncoded(java.lang.String string)
          Return true if the input String is Bubble Babble encoded
static void main(java.lang.String[] args)
          java com.izzyway.util.BubbleBabble [-encode -decode] input [output] Encode or decode the input -encode input output: encode the input pathname into the output pathname -decode input output: decode the input pathname into the output pathname
 java.lang.String transform(java.lang.String src)
          Decode the input String if encoded, encode input String if not encoded
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BubbleBabble

public BubbleBabble()
Method Detail

encode

public java.lang.String encode(java.lang.String src)
                        throws java.io.IOException
Encode the input String

Parameters:
src - - The String to be encoded
Returns:
String representation of the Bubble Babble encoded input String
Throws:
java.io.IOException

encode

public void encode(java.io.InputStream src,
                   java.io.Writer out)
            throws java.io.IOException
Encode the input data

Parameters:
src - - Stream of input data
out - - Encoded writer
Throws:
java.io.IOException

decode

public java.lang.String decode(java.lang.String src)
                        throws java.io.IOException
Decode the String input

Parameters:
src - - String input to be decoded
Returns:
String representation of the decoded String
Throws:
java.io.IOException

transform

public java.lang.String transform(java.lang.String src)
                           throws java.io.IOException
Decode the input String if encoded, encode input String if not encoded

Parameters:
src - - input String
Returns:
the decoded or encoded String
Throws:
java.io.IOException

decode

public void decode(java.io.Reader reader,
                   java.io.OutputStream out)
            throws java.io.IOException
Decode the input data

Parameters:
reader - - input data to be decoded
out - - output stream of the decoded data
Throws:
java.io.IOException

isEncoded

public boolean isEncoded(java.lang.String string)
Return true if the input String is Bubble Babble encoded

Parameters:
string - - input String
Returns:

main

public static void main(java.lang.String[] args)
java com.izzyway.util.BubbleBabble [-encode -decode] input [output]

Parameters:
args -