org.apache.calcite.avatica

## Class AvaticaSqlException.PrintStreamOrWriter

- java.lang.Object
- - org.apache.calcite.avatica.AvaticaSqlException.PrintStreamOrWriter

Enclosing class:
  AvaticaSqlException

    private static class AvaticaSqlException.PrintStreamOrWriter
    extends Object

A class that encapsulates either a PrintStream or a PrintWriter.

### Nested Class Summary

Nested Classes
`private static class` `AvaticaSqlException.PrintStreamOrWriter.Type` Enumeration to differentiate between a PrintStream and a PrintWriter.

### Field Summary

Fields
`private PrintStream` `stream`
`private AvaticaSqlException.PrintStreamOrWriter.Type` `type`
`private PrintWriter` `writer`

### Constructor Summary

Constructors
Constructor and Description
`AvaticaSqlException.PrintStreamOrWriter(PrintStream stream)`
`AvaticaSqlException.PrintStreamOrWriter(PrintWriter writer)`

### Method Summary

Methods
`void` `println(String string)` Prints the given string to the the provided stream or writer.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### stream

    private PrintStream stream

#### writer

    private PrintWriter writer

#### type

    private final AvaticaSqlException.PrintStreamOrWriter.Type type

### Constructor Detail

#### AvaticaSqlException.PrintStreamOrWriter

    public AvaticaSqlException.PrintStreamOrWriter(PrintStream stream)

#### AvaticaSqlException.PrintStreamOrWriter

    public AvaticaSqlException.PrintStreamOrWriter(PrintWriter writer)

### Method Detail

#### println

    public void println(String string)

Prints the given string to the the provided stream or writer.

Parameters:
  `string` - The string to print