From 4ac6e6a6254912e2173f76e65d7e9066cf6ae203 Mon Sep 17 00:00:00 2001 From: "Christian P. MOMON" Date: Wed, 29 Jun 2016 22:37:03 +0200 Subject: [PATCH] Clean code removing Wrapper unuseful class. --- src/fr/devinsy/util/cmdexec/Wrapper.java | 88 ------------------------ 1 file changed, 88 deletions(-) delete mode 100644 src/fr/devinsy/util/cmdexec/Wrapper.java diff --git a/src/fr/devinsy/util/cmdexec/Wrapper.java b/src/fr/devinsy/util/cmdexec/Wrapper.java deleted file mode 100644 index b3a97ed..0000000 --- a/src/fr/devinsy/util/cmdexec/Wrapper.java +++ /dev/null @@ -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 - */ -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"); - } -} - -// ////////////////////////////////////////////////////////////////////////