reads row data from a stream using the JDBC types in colTypes

@param  colTypes
@throws  IOException
@throws  HsqlException
354127
public Object[] readData(Type[] colTypes)
    throws IOException, HsqlException {

        int      l    = colTypes.length;
        Object[] data = new Object[l];
        Object   o;
        Type     type;

        for (int i = 0; i < l; i++) {
            if (checkNull()) {
                continue;
            }

            o    = null;
            type = colTypes[i];

            switch (type.typeCode) {

                case Types.SQL_ALL_TYPES :
                case Types.SQL_CHAR :
                case Types.SQL_VARCHAR :
                case Types.VARCHAR_IGNORECASE :
                    o = readChar(type);
                    break;

                case Types.TINYINT :
                case Types.SQL_SMALLINT :
                    o = readSmallint();
                    break;

                case Types.SQL_INTEGER :
                    o = readInteger();
                    break;

                case Types.SQL_BIGINT :
                    o = readBigint();
                    break;

                //fredt although REAL is now Double, it is read / written in
                //the old format for compatibility
                case Types.SQL_REAL :
                case Types.SQL_FLOAT :
                case Types.SQL_DOUBLE :
                    o = readReal();
                    break;

                case Types.SQL_NUMERIC :
                case Types.SQL_DECIMAL :
                    o = readDecimal(type);
                    break;

                case Types.SQL_DATE :
                    o = readDate(type);
                    break;

                case Types.SQL_TIME :
                case Types.SQL_TIME_WITH_TIME_ZONE :
                    o = readTime(type);
                    break;

                case Types.SQL_TIMESTAMP :
                case Types.SQL_TIMESTAMP_WITH_TIME_ZONE :
                    o = readTimestamp(type);
                    break;

                case Types.SQL_INTERVAL_YEAR :
                case Types.SQL_INTERVAL_YEAR_TO_MONTH :
                case Types.SQL_INTERVAL_MONTH :
                    o = readYearMonthInterval(type);
                    break;

                case Types.SQL_INTERVAL_DAY :
                case Types.SQL_INTERVAL_DAY_TO_HOUR :
                case Types.SQL_INTERVAL_DAY_TO_MINUTE :
                case Types.SQL_INTERVAL_DAY_TO_SECOND :
                case Types.SQL_INTERVAL_HOUR :
                case Types.SQL_INTERVAL_HOUR_TO_MINUTE :
                case Types.SQL_INTERVAL_HOUR_TO_SECOND :
                case Types.SQL_INTERVAL_MINUTE :
                case Types.SQL_INTERVAL_MINUTE_TO_SECOND :
                case Types.SQL_INTERVAL_SECOND :
                    o = readDaySecondInterval(type);
                    break;

                case Types.SQL_BOOLEAN :
                    o = readBoole();
                    break;

                case Types.OTHER :
                    o = readOther();
                    break;

                case Types.SQL_CLOB :
                    o = readClob();
                    break;

                case Types.SQL_BLOB :
                    o = readBlob();
                    break;

                case Types.SQL_BINARY :
                case Types.SQL_VARBINARY :
                    o = readBinary();
                    break;

                case Types.SQL_BIT :
                case Types.SQL_BIT_VARYING :
                    o = readBit();
                    break;

                default :
                    throw Error.runtimeError(ErrorCode.U_S0500,
                                             "RowInputBase "
                                             + type.getNameString());
            }

            data[i] = o;
        }

        return data;
    }
222955
void readFrom(InputStream in) throws IOException {
		//TODO could optimize for aligned instances
		final int size = finish - start;
		final int length = (size + 7) >> 3;
		if (length == 0) return;
		int p = size & 7;
		final int q = finish - p;
		if (p != 0) performAdj(SET, q, (long) in.read(), p);
		p = q;
		while (p > start) {
			p -= 8;
			performAdj(SET, p, (long) in.read(), 8);
		}
	}
164048
private void readQueryResult(InH3 hIn, HeadersAmp headers)
      throws IOException
  {
    ServiceRefAmp serviceRef = readToAddress(hIn);
  
    long id = hIn.readLong();

    QueryRefAmp queryRef = serviceRef.removeQueryRef(id);
  
    if (queryRef != null) {
      ClassLoader loader = queryRef.getClassLoader();

      Thread thread = Thread.currentThread();
      thread.setContextClassLoader(loader);
      // XXX: _serializer.setClassLoader(loader);
    }
    else {
      // XX: _serializer.setClassLoader(null);
    }

    Object value = hIn.readObject();

    if (log.isLoggable(_logLevel)) {
      log.log(_logLevel, "query-result-r " + value + " (in " + this + ")"
              + "\n  {id:" + id + ", to:" + serviceRef + "," + headers + "}");
    }

    if (queryRef != null) {
      queryRef.complete(headers, value);
    }
    else if (log.isLoggable(Level.WARNING)) {
      log.warning("query-result qid=" + id + " for service " + serviceRef +
                  " does not match any known queries.\n" + headers);
    }
  }
88580
public static <K, V> HadoopInputFormat<K, V> readSequenceFile(Class<K> key, Class<V> value, String inputPath) throws IOException {
		return readHadoopFile(new org.apache.hadoop.mapred.SequenceFileInputFormat<K, V>(), key, value, inputPath);
	}
133741
private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException {
        // instantiate persistent variables
        stream.defaultReadObject();
        // initialize the non-null transient variables
        cachedEncoding = new byte[EncodingLevel.values().length][];
    }
521929
public Table defineLocalTable(HsqlName tableName, HsqlName[] colNames, Type[] colTypes) {
        // I'm not sure the table type, here TableBase.CACHED_TABLE, matters
        // all that much.
    	assert(localTables != null);
        Table newTable = TableUtil.newTable(database, TableBase.CACHED_TABLE, tableName);
        TableUtil.setColumnsInSchemaTable(newTable, colNames, colTypes);
        newTable.createPrimaryKey(new int[0]);
        localTables.put(tableName.name, newTable);
        return newTable;
    }
464925
@Override
	public void read(DataInputView in) throws IOException {
		synchronized (this.confData) {
			final int numberOfProperties = in.readInt();

			for (int i = 0; i < numberOfProperties; i++) {
				String key = StringValue.readString(in);
				Object value;

				byte type = in.readByte();
				switch (type) {
					case TYPE_STRING:
						value = StringValue.readString(in);
						break;
					case TYPE_INT:
						value = in.readInt();
						break;
					case TYPE_LONG:
						value = in.readLong();
						break;
					case TYPE_FLOAT:
						value = in.readFloat();
						break;
					case TYPE_DOUBLE:
						value = in.readDouble();
						break;
					case TYPE_BOOLEAN:
						value = in.readBoolean();
						break;
					case TYPE_BYTES:
						byte[] bytes = new byte[in.readInt()];
						in.readFully(bytes);
						value = bytes;
						break;
					default:
						throw new IOException("Unrecognized type: " + type);
				}

				this.confData.put(key, value);
			}
		}
	}
299458
public <T> List<T> read(int headerRowIndex, int startRowIndex, Class<T> beanType) {
		return read(headerRowIndex, startRowIndex, Integer.MAX_VALUE, beanType);
	}
1004798
public <T extends FastSerializable> T readObject(final Class<T> expectedType) throws IOException {
        assert(expectedType != null);
        T obj = null;
        try {
            obj = expectedType.newInstance();
            obj.readExternal(this);
        } catch (final InstantiationException e) {
            e.printStackTrace();
        } catch (final IllegalAccessException e) {
            e.printStackTrace();
        }
        return obj;
    }
922651
public <T> T read(final InputStream stream, final DataTypeDescriptor<T> descriptor)
			throws Exception {
		if (stream == null) throw new NullPointerException("input");
		if (descriptor == null) throw new NullPointerException("descriptor");

		JsonParser parser = factory.createParser(stream);
		return read(parser, descriptor);
	}
595497
@Override
    public ResultSet getTableTypes() throws SQLException
    {
        checkClosed();
        VoltTable vtable = new VoltTable(new ColumnInfo("TABLE_TYPE", VoltType.STRING));
        for (String type : tableTypes) {
            vtable.addRow(type);
        }
        JDBC4ResultSet res = new JDBC4ResultSet(this.sysCatalog, vtable);
        return res;
    }
388863
@Override
  void scan(EnvKelp query, Object []values, RowCursor cursor)
  {
    try (InputStream is = cursor.openInputStream(getColumn().index())) {
      if (is == null) {
        return;
      }

      _serializer.query(is, _query, values);
    } catch (IOException e) {
      log.log(Level.FINER, e.toString(), e);
    }
  }
1173877
private void readObject(java.io.ObjectInputStream s) throws IOException, ClassNotFoundException {
    s.defaultReadObject();      // Read nothing
    initialize(MIN_SIZE);
    for(;;) {
      final TypeK K = (TypeK) s.readObject();
      final TypeV V = (TypeV) s.readObject();
      if( K == null ) break;
      put(K,V);                 // Insert with an offical put
    }
  }
503416
@SuppressWarnings("unchecked")
    private void readObject(java.io.ObjectInputStream s)
        throws IOException, ClassNotFoundException {
        // Don't call defaultReadObject()
        ObjectInputStream.GetField oisFields = s.readFields();
        final Segment<K,V>[] oisSegments = (Segment<K,V>[])oisFields.get("segments", null);

        final int ssize = oisSegments.length;
        if (ssize < 1 || ssize > MAX_SEGMENTS
            || (ssize & (ssize-1)) != 0 ) {
          throw new java.io.InvalidObjectException("Bad number of segments:"
                                                   + ssize);
        }
        int sshift = 0, ssizeTmp = ssize;
        while (ssizeTmp > 1) {
            ++sshift;
            ssizeTmp >>>= 1;
        }
        UNSAFE.putIntVolatile(this, SEGSHIFT_OFFSET, 32 - sshift);
        UNSAFE.putIntVolatile(this, SEGMASK_OFFSET, ssize - 1);
        UNSAFE.putObjectVolatile(this, SEGMENTS_OFFSET, oisSegments);

        // set hashMask
        UNSAFE.putIntVolatile(this, HASHSEED_OFFSET, randomHashSeed(this));

        // Re-initialize segments to be minimally sized, and let grow.
        int cap = MIN_SEGMENT_TABLE_CAPACITY;
        final Segment<K,V>[] segments = this.segments;
        for (int k = 0; k < segments.length; ++k) {
            Segment<K,V> seg = segments[k];
            if (seg != null) {
                seg.threshold = (int)(cap * seg.loadFactor);
                seg.table = new HashEntry[cap];
            }
        }

        // Read the keys and values, and put the mappings in the table
        for (;;) {
            K key = (K) s.readObject();
            V value = (V) s.readObject();
            if (key == null) {
              break;
            }
            put(key, value);
        }
    }
962915
static void initializeDatabaseDriver(String databaseType) {
    String driverClass = System.getProperty(JDBC_DRIVER_CLASS_KEY_PREFIX + databaseType);
    if (driverClass != null) {
      Log.debug("Loading " + driverClass + " to initialize database of type " + databaseType);
      try {
        Class.forName(driverClass);
      } catch (ClassNotFoundException e) {
        throw new RuntimeException("Connection to '" + databaseType + "' database is not possible due to missing JDBC driver. " +
                "User specified driver class: " + driverClass, e);
      }
      return;
    }
    // use built-in defaults
    switch (databaseType) {
      case HIVE_DB_TYPE:
        try {
          Class.forName(HIVE_JDBC_DRIVER_CLASS);
        } catch (ClassNotFoundException e) {
          throw new RuntimeException("Connection to HIVE database is not possible due to missing JDBC driver.", e);
        }
        break;
      case NETEZZA_DB_TYPE:
        try {
          Class.forName(NETEZZA_JDBC_DRIVER_CLASS);
        } catch (ClassNotFoundException e) {
          throw new RuntimeException("Connection to Netezza database is not possible due to missing JDBC driver.", e);
        }
        break;
      default:
        //nothing to do
    }
  }
523269
public void readFrom(DataInput instream) throws Exception {
        host = S3Util.readString(instream);
        port = instream.readInt();
        protocol = S3Util.readString(instream);
    }
1035438
private void read(InputStream is, Table table) throws IOException
   {
      byte[] buffer = new byte[m_definition.getPageSize()];
      while (true)
      {
         int bytesRead = is.read(buffer);
         if (bytesRead == -1)
         {
            break;
         }

         if (bytesRead != buffer.length)
         {
            throw new IOException("Unexpected end of file");
         }

         readPage(buffer, table);
      }
   }