Clean code removing Wrapper unuseful class.

This commit is contained in:
Christian P. MOMON 2016-06-29 22:37:03 +02:00
parent 44181a94a2
commit 4ac6e6a625

View file

@ -1,88 +0,0 @@
/**
* Copyright (C) 2005-2008, 2010, 2013 Christian Pierre MOMON
*
* This file is part of Devinsy-utils.
*
* Devinsy-utils is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Devinsy-utils 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 Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Devinsy-utils. If not, see <http://www.gnu.org/licenses/>
*/
package fr.devinsy.util.cmdexec;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.io.PrintWriter;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* @deprecated
*
* @author Christian Pierre MOMON (christian.momon@devinsy.fr)
*/
@Deprecated
public class Wrapper
{
private static final Wrapper instance = new Wrapper();
private static final Logger logger = LoggerFactory.getLogger(Wrapper.class);
/**
* return instance of the controller
*/
public static Wrapper instance()
{
return (instance);
}
/**
*
*/
static public StringBuffer wrap(final String ressource) throws IOException
{
logger.info("Enter");
StringBuffer result;
result = new StringBuffer();
BufferedReader buf = new BufferedReader(new FileReader(ressource));
String ligne;
while ((ligne = buf.readLine()) != null)
{
result.append(ligne + "\n");
}
//
logger.info("Exit");
return (result);
}
/**
*
*/
static public void wrap(final String ressource, final PrintWriter output) throws IOException
{
logger.info("Enter");
BufferedReader buf = new BufferedReader(new FileReader(ressource));
String ligne;
while ((ligne = buf.readLine()) != null)
{
output.print(ligne);
}
logger.info("Exit");
}
}
// ////////////////////////////////////////////////////////////////////////