org.gcube.contentmanagement.timeseriesservice.impl.utils
Class Util

java.lang.Object
  extended by org.gcube.contentmanagement.timeseriesservice.impl.utils.Util

public class Util
extends java.lang.Object


Field Summary
static java.text.SimpleDateFormat dateFormatter
           
 
Constructor Summary
Util()
           
 
Method Summary
static void getZip(java.io.OutputStream os, java.lang.String name, java.io.InputStream is)
           
static Types mapJavaToSql(DataType sqlType)
           
static DataType mapSqlToJava(Types type)
           
static java.lang.String removeSizeFromDBType(java.lang.String typeName)
           
static java.lang.String replaceKeyType(java.lang.String type)
           
static void streamToFile(java.io.InputStream instream, java.io.OutputStream out)
           
static java.lang.String toJSon(java.sql.ResultSet resultSet)
           
static void unzip(java.io.InputStream is, java.io.OutputStream os)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

dateFormatter

public static java.text.SimpleDateFormat dateFormatter
Constructor Detail

Util

public Util()
Method Detail

toJSon

public static java.lang.String toJSon(java.sql.ResultSet resultSet)
                               throws java.sql.SQLException
Throws:
java.sql.SQLException

streamToFile

public static void streamToFile(java.io.InputStream instream,
                                java.io.OutputStream out)
                         throws java.lang.Exception
Throws:
java.lang.Exception

unzip

public static void unzip(java.io.InputStream is,
                         java.io.OutputStream os)
                  throws java.lang.Exception
Parameters:
is - the zip stream.
os - the output stream.
Throws:
java.lang.Exception

getZip

public static void getZip(java.io.OutputStream os,
                          java.lang.String name,
                          java.io.InputStream is)
                   throws java.lang.Exception
Throws:
java.lang.Exception

removeSizeFromDBType

public static java.lang.String removeSizeFromDBType(java.lang.String typeName)

mapSqlToJava

public static DataType mapSqlToJava(Types type)
                             throws java.lang.Exception
Throws:
java.lang.Exception

mapJavaToSql

public static Types mapJavaToSql(DataType sqlType)

replaceKeyType

public static java.lang.String replaceKeyType(java.lang.String type)
                                       throws java.lang.Exception
Throws:
java.lang.Exception