org.vafer.jdeb.utils
Class Utils

java.lang.Object
  extended by org.vafer.jdeb.utils.Utils

public final class Utils
extends Object

Simple utils functions. ATTENTION: don't use outside of jdeb

Author:
Torsten Curdt

Constructor Summary
Utils()
           
 
Method Summary
static int copy(InputStream pInput, OutputStream pOutput)
           
static String replaceVariables(VariableResolver pResolver, String pExpression, String pOpen, String pClose)
          Substitute the variables in the given expression with the values from the resolver
static String stripLeadingSlash(String s)
           
static String stripPath(int p, String s)
           
static String toHex(byte[] pBytes)
           
static byte[] toUnixLineEndings(InputStream input)
          Replaces new line delimiters in the input stream with the Unix line feed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Utils

public Utils()
Method Detail

copy

public static int copy(InputStream pInput,
                       OutputStream pOutput)
                throws IOException
Throws:
IOException

toHex

public static String toHex(byte[] pBytes)

stripPath

public static String stripPath(int p,
                               String s)

stripLeadingSlash

public static String stripLeadingSlash(String s)

replaceVariables

public static String replaceVariables(VariableResolver pResolver,
                                      String pExpression,
                                      String pOpen,
                                      String pClose)
                               throws ParseException
Substitute the variables in the given expression with the values from the resolver

Parameters:
pVariables -
pExpression -
Returns:
Throws:
ParseException

toUnixLineEndings

public static byte[] toUnixLineEndings(InputStream input)
                                throws IOException
Replaces new line delimiters in the input stream with the Unix line feed.

Parameters:
input -
Throws:
IOException


Copyright © 2012. All Rights Reserved.