Class DatabaseOutputStream

    • Constructor Detail

      • DatabaseOutputStream

        public DatabaseOutputStream​(Connection conn)
      • DatabaseOutputStream

        public DatabaseOutputStream()
    • Method Detail

      • write

        public void write​(int b)
        This method is not supported in DatabaseOutputStream because it doesn't make sense to write a single int to a database stream. So always throws UnsupportedOperationException.
        Specified by:
        write in class OutputStream
        Throws:
        UnsupportedOperationException
      • write

        public void write​(String stmt)
                   throws SQLException
        Executes the given statement in the database.
        Parameters:
        stmt - SQL to be executed
        Throws:
        SQLException - Thrown if there is a problem preparing stmt as a statement, or in executing it.
      • setConnection

        public void setConnection​(Connection conn)