All Downloads are FREE. Search and download functionalities are using the official Maven repository.

de.knightsoft.dbnavigationbar.server.StringToJSON Maven / Gradle / Ivy

/**
 * This file is part of DBNavigationBar.
 *
 * DBNavigationBar is free software: you can redistribute it and/or modify it under the terms of the
 * GNU Affero General Public License as published by the Free Software Foundation, either version 3
 * of the License, or (at your option) any later version.
 *
 * DBNavigationBar 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 General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License along with DBNavigationBar. If
 * not, see  StringToJSON.MAX_LENGTH) {
              jsonStringTab[pos++] = '\\';
              jsonStringTab[pos++] = 'u';
              final String jasonHex = String.format("%04x", Integer.valueOf(test));
              jsonStringTab[pos++] = jasonHex.charAt(0);
              jsonStringTab[pos++] = jasonHex.charAt(1);
              jsonStringTab[pos++] = jasonHex.charAt(2);
              jsonStringTab[pos++] = jasonHex.charAt(StringToJSON.THREE);
            } else {
              jsonStringTab[pos++] = javaStringTab[i];
            }
            break;
        }
      }

      jsonString = new String(jsonStringTab, 0, pos);
    }

    return jsonString;
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy