yu.ac.bg.etf.javaqx.util
Class Utilities

java.lang.Object
  extended byyu.ac.bg.etf.javaqx.util.Utilities

public final class Utilities
extends java.lang.Object

Helper Class.

Version:
0.2.0
Author:
Slobodan Vrkacevic (slobodan.vrkacevic@gmail.com)

Method Summary
static boolean equals(java.lang.Object obj1, java.lang.Object obj2)
          Returns true if the specified objects are equal or both are null.
static byte[] toByteArray(java.io.InputStream is)
          Extracts bytes from specified input stream.
static java.lang.String toString(java.io.InputStream is)
          Reads all input stream content as string.
static java.lang.String toString(java.io.Reader reader)
          Reads read content as string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

equals

public static boolean equals(java.lang.Object obj1,
                             java.lang.Object obj2)
Returns true if the specified objects are equal or both are null.

Parameters:
obj1 - the first object
obj2 - the second object
Returns:
true if the specified objects are equal or both are null

toByteArray

public static byte[] toByteArray(java.io.InputStream is)
                          throws java.io.IOException
Extracts bytes from specified input stream.

Parameters:
is - the input stream
Returns:
extracted bytes from input stream
Throws:
java.io.IOException - on an I/O error

toString

public static java.lang.String toString(java.io.Reader reader)
                                 throws java.io.IOException
Reads read content as string.

Parameters:
reader - the reader
Returns:
reader's content as string
Throws:
java.io.IOException - on an I/O error

toString

public static java.lang.String toString(java.io.InputStream is)
                                 throws java.io.IOException
Reads all input stream content as string.

Parameters:
is - the input stream
Returns:
input stream content as string
Throws:
java.io.IOException - on an I/O error


Copyright © 2007 ETF and contributors. All Rights Reserved.