Java Doc for Utils.java in  » Database-DBMS » TinySQL » com » sqlmagic » tinysql » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Database DBMS » TinySQL » com.sqlmagic.tinysql 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.sqlmagic.tinysql.Utils

Utils
public class Utils (Code)
Some helper methods for tinySQL
author:
   Brian Jepson
author:
   Marcel Ruff Added write access to dBase and JDK 2 support


Field Summary
final static  booleandebug
    
final static  Stringencode
    


Method Summary
public static  booleanclearFunction(String inputName)
    
final public static  voiddelFile(String fname)
    
final public static  voiddelFile(String dataDir, String fname)
    
public static  booleanendsWithFunctionName(String inputName)
    
final public static  shortfixByte(byte b)
    
final public static  StringforceToSize(String str, int size, String padChar)
    
final public static  byte[]forceToSize(String str, int size, byte padByte)
    
final public static  VectorgetAllFiles(String path, String suffix)
    
final public static  byte[]intToLittleEndian(int val)
    
public static  booleanisCharColumn(int columnType)
    
public static  booleanisDateColumn(int columnType)
    
public static  booleanisFunctionName(String inputName)
    
public static  booleanisNumberColumn(int columnType)
    
final static  voidlog(String id, String str)
    
final static  voidlog(String str)
    
final public static  booleanrenameFile(String oldName, String newName)
    
public static  voidsetPriority(Vector inputList, String inputTable)
    
final public static  byte[]shortToLittleEndian(short val)
    
final public static  StringstripPathAndExtension(String file)
    
final public static  doublevax_to_long(byte[] b)
     Converts a little-endian four-byte array to a long, represented as a double, since long is signed. I don't know why Java doesn't supply this.
final public static  intvax_to_short(byte[] b)
     Converts a little-endian four-byte array to a short, represented as an int, since short is signed. I don't know why Java doesn't supply this.

Field Detail
debug
final static boolean debug(Code)
For debugging/tracing Switch the debug mode on/off:



encode
final static String encode(Code)





Method Detail
clearFunction
public static boolean clearFunction(String inputName)(Code)



delFile
final public static void delFile(String fname) throws NullPointerException, IOException(Code)



delFile
final public static void delFile(String dataDir, String fname) throws NullPointerException, IOException(Code)



endsWithFunctionName
public static boolean endsWithFunctionName(String inputName)(Code)



fixByte
final public static short fixByte(byte b)(Code)



forceToSize
final public static String forceToSize(String str, int size, String padChar)(Code)
Cut or padd the string to the given size
Parameters:
  a - string
Parameters:
  size - the wanted length
Parameters:
  padChar - char to use for padding (must be of length()==1!) the string with correct lenght, padded with pad if necessary



forceToSize
final public static byte[] forceToSize(String str, int size, byte padByte) throws java.io.UnsupportedEncodingException(Code)
Cut or padd the string to the given size
Parameters:
  a - string
Parameters:
  size - the wanted length
Parameters:
  padByte - char to use for padding the string with correct lenght, padded with pad if necessary



getAllFiles
final public static Vector getAllFiles(String path, String suffix)(Code)



intToLittleEndian
final public static byte[] intToLittleEndian(int val)(Code)
Converts a long to a little-endian four-byte array



isCharColumn
public static boolean isCharColumn(int columnType)(Code)



isDateColumn
public static boolean isDateColumn(int columnType)(Code)



isFunctionName
public static boolean isFunctionName(String inputName)(Code)



isNumberColumn
public static boolean isNumberColumn(int columnType)(Code)



log
final static void log(String id, String str)(Code)



log
final static void log(String str)(Code)



renameFile
final public static boolean renameFile(String oldName, String newName)(Code)
rename a file true if succeeded



setPriority
public static void setPriority(Vector inputList, String inputTable)(Code)



shortToLittleEndian
final public static byte[] shortToLittleEndian(short val)(Code)
Converts a long to a little-endian two-byte array



stripPathAndExtension
final public static String stripPathAndExtension(String file)(Code)
Strip the path and suffix of a file name
Parameters:
  file - "/usr/local/dbase/test.DBF" "test"



vax_to_long
final public static double vax_to_long(byte[] b)(Code)
Converts a little-endian four-byte array to a long, represented as a double, since long is signed. I don't know why Java doesn't supply this. It could be that it's there somewhere, but I looked and couldn't find it.



vax_to_short
final public static int vax_to_short(byte[] b)(Code)
Converts a little-endian four-byte array to a short, represented as an int, since short is signed. I don't know why Java doesn't supply this. It could be that it's there somewhere, but I looked and couldn't find it.



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.