protected Object copyValue ( TColumn column , Object value ) { Object copyValue = value ; switch ( column . getDataType ( ) ) { case BLOB : if ( value instanceof byte [ ] ) { byte [ ] bytes = ( byte [ ] ) value ; copyValue = Arrays . copyOf ( bytes , bytes . length ) ; } else { throw new GeoPackageException ( "Unsupported copy value type. column: " + column . getName ( ) + ", value type: " + value . getClass ( ) . getName ( ) + ", data type: " + column . getDataType ( ) ) ; } break ; case DATE : case DATETIME : if ( value instanceof Date ) { Date date = ( Date ) value ; copyValue = new Date ( date . getTime ( ) ) ; } else if ( ! ( value instanceof String ) ) { throw new GeoPackageException ( "Unsupported copy value type. column: " + column . getName ( ) + ", value type: " + value . getClass ( ) . getName ( ) + ", data type: " + column . getDataType ( ) ) ; } break ; default : }
Copy the value of the data type