Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (101)
JavaBeans (21)
JDBC (121)
JDK (426)
JSP (20)
Logging (108)
Mail (58)
Messaging (8)
Network (84)
PDF (97)
Report (7)
Scripting (84)
Security (32)
Server (121)
Servlet (26)
SOAP (24)
Testing (54)
Web (15)
XML (309)
Collections:
Other Resources:
jTDS JDBC Driver Source Code Files
jTDS JDBC Driver Source Code Files are provided in the source package file, jtds-1.3.1-fyi.zip.
You can browse jTDS JDBC Driver Source Code files below:
✍: FYIcenter.com
⏎ net/sourceforge/jtds/jdbc/Messages.java
// jTDS JDBC Driver for Microsoft SQL Server and Sybase // Copyright (C) 2004 The jTDS Project // // This library 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 2.1 of the License, or (at your option) any later version. // // This library 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 this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // package net.sourceforge.jtds.jdbc; import java.text.MessageFormat; import java.util.Enumeration; import java.util.Map; import java.util.ResourceBundle; /** * Support class for <code>Messages.properties</code>. * * @author David D. Kilzer * @author Mike Hutchinson * @version $Id: Messages.java,v 1.8 2005-04-20 16:49:22 alin_sinpalean Exp $ */ public final class Messages { /** * Default name for resource bundle containing the messages. */ private static final String DEFAULT_RESOURCE = "net.sourceforge.jtds.jdbc.Messages"; /** * Cached resource bundle containing the messages. * <p> * <code>ResourceBundle</code> does caching internally but this caching * involves a lot of string operations to generate the keys used for * caching, leading to a lot of <code>StringBuffer</code> reallocation. In * one run through the complete jTDS test suite there were over 60000 * allocations and reallocations (about one for each <code>get()</code> * call). */ private static ResourceBundle defaultResource; /** * Default constructor. Private to prevent instantiation. */ private Messages() { } /** * Get runtime message using supplied key. * * @param key The key of the message in Messages.properties * @return The selected message as a <code>String</code>. */ public static String get(String key) { return get(key, null); } /** * Get runtime message using supplied key and substitute parameter * into message. * * @param key The key of the message in Messages.properties * @param param1 The object to insert into message. * @return The selected message as a <code>String</code>. */ public static String get(String key, Object param1) { Object args[] = {param1}; return get(key, args); } /** * Get runtime message using supplied key and substitute parameters * into message. * * @param key The key of the message in Messages.properties * @param param1 The object to insert into message. * @param param2 The object to insert into message. * @return The selected message as a <code>String</code>. */ static String get(String key, Object param1, Object param2) { Object args[] = {param1, param2}; return get(key, args); } /** * Get runtime error using supplied key and substitute parameters * into message. * * @param key The key of the error message in Messages.properties * @param arguments The objects to insert into the message. * @return The selected error message as a <code>String</code>. */ private static String get(String key, Object[] arguments) { try { ResourceBundle bundle = loadResourceBundle(); String formatString = bundle.getString(key); // No need for any formatting if no parameters are specified if (arguments == null || arguments.length == 0) { return formatString; } else { MessageFormat formatter = new MessageFormat(formatString); return formatter.format(arguments); } } catch (java.util.MissingResourceException mre) { throw new RuntimeException("No message resource found for message property " + key); } } /** * Retrieve the list of driver property names and driver property * descriptions from <code>Messages.properties</code> and populate * them into {@link Map} objects. * <p/> * The keys used to populate both <code>propertyMap</code> and * <code>descriptionMap</code> are guaranteed to match up as long * as the properties defined in <code>Messages.properties</code> * are well-formed. * * @param propertyMap The map of property names to be populated. * @param descriptionMap The map of property descriptions to be populated. */ static void loadDriverProperties(Map propertyMap, Map descriptionMap) { final ResourceBundle bundle = loadResourceBundle(); final Enumeration keys = bundle.getKeys(); while (keys.hasMoreElements()) { final String key = (String) keys.nextElement(); final String descriptionPrefix = "prop.desc."; final String propertyPrefix = "prop."; if (key.startsWith(descriptionPrefix)) { descriptionMap.put(key.substring(descriptionPrefix.length()), bundle.getString(key)); } else if (key.startsWith(propertyPrefix)) { propertyMap.put(key.substring(propertyPrefix.length()), bundle.getString(key)); } } } /** * Load the {@link #DEFAULT_RESOURCE} resource bundle. * * @return The resource bundle. */ private static ResourceBundle loadResourceBundle() { if (defaultResource == null) { defaultResource = ResourceBundle.getBundle(DEFAULT_RESOURCE); } return defaultResource; } }
⏎ net/sourceforge/jtds/jdbc/Messages.java
Or download all of them as a single archive file:
File name: jtds-1.3.1-fyi.zip File size: 323160 bytes Release date: 2013-06-08 Download
⇐ What Is jtds-1.3.1-dist.zip?
2016-11-26, 7831👍, 0💬
Popular Posts:
Jettison is a collection of Java APIs (like STaX and DOM) which read and write JSON. This allows nea...
JDK 11 java.xml.jmod is the JMOD file for JDK 11 XML (eXtensible Markup Language) module. JDK 11 XML...
JDK 11 java.compiler.jmod is the JMOD file for JDK 11 Compiler module. JDK 11 Compiler module compil...
JDK 11 jdk.compiler.jmod is the JMOD file for JDK 11 Compiler tool, which can be invoked by the "jav...
The Bouncy Castle Crypto package is a Java implementation of cryptographic algorithms, it was develo...