removed bad quality code
authorSvjatoslav Agejenko <svjatoslav@svjatoslav.eu>
Fri, 20 Mar 2015 21:37:09 +0000 (23:37 +0200)
committerSvjatoslav Agejenko <svjatoslav@svjatoslav.eu>
Fri, 20 Mar 2015 21:37:09 +0000 (23:37 +0200)
src/main/java/eu/svjatoslav/commons/network/UrlParamEncoder.java [deleted file]
src/test/java/eu/svjatoslav/commons/network/UrlParamEncoderTest.java [deleted file]

diff --git a/src/main/java/eu/svjatoslav/commons/network/UrlParamEncoder.java b/src/main/java/eu/svjatoslav/commons/network/UrlParamEncoder.java
deleted file mode 100755 (executable)
index 452321b..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Svjatoslav Commons - shared library of common functionality.
- * Copyright ©2012-2014, Svjatoslav Agejenko, svjatoslav@svjatoslav.eu
- * 
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 3 of the GNU Lesser General Public License
- * or later as published by the Free Software Foundation.
- */
-
-package eu.svjatoslav.commons.network;
-
-public class UrlParamEncoder {
-
-       public static String decode(final String source) {
-
-               final String result = source.replaceAll("%20", " ");
-
-               return result;
-       }
-
-       public static String encode(final String source) {
-
-               final StringBuffer buffer = new StringBuffer();
-               for (int i = 0; i < source.length(); i++) {
-                       boolean replaced = false;
-                       final char character = source.charAt(i);
-
-                       if (character == ' ') {
-                               buffer.append("%20");
-                               replaced = true;
-                       }
-
-                       if (character == '?') {
-                               buffer.append("%3F");
-                               replaced = true;
-                       }
-
-                       if (character == ',') {
-                               buffer.append("%2C");
-                               replaced = true;
-                       }
-
-                       if (character == ':') {
-                               buffer.append("%3A");
-                               replaced = true;
-                       }
-
-                       if (!replaced)
-                               buffer.append(character);
-               }
-
-               return buffer.toString();
-       }
-
-}
diff --git a/src/test/java/eu/svjatoslav/commons/network/UrlParamEncoderTest.java b/src/test/java/eu/svjatoslav/commons/network/UrlParamEncoderTest.java
deleted file mode 100755 (executable)
index 0daa714..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Svjatoslav Commons - shared library of common functionality.
- * Copyright ©2012-2014, Svjatoslav Agejenko, svjatoslav@svjatoslav.eu
- * 
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 3 of the GNU Lesser General Public License
- * or later as published by the Free Software Foundation.
- */
-
-package eu.svjatoslav.commons.network;
-
-import org.junit.Before;
-import org.junit.Test;
-
-public class UrlParamEncoderTest {
-
-       @Before
-       public void setUp() throws Exception {
-       }
-
-       @Test
-       public void test() {
-               final String result = UrlParamEncoder.decode("this%20is%20a%20test.");
-               System.out.println(result);
-       }
-
-}