cascading.tap.local

## Class StdOutTap

- java.lang.Object
- - cascading.tap.Tap<Config,java.lang.Void,Output>
  - - cascading.tap.SinkTap<java.util.Properties,java.io.OutputStream>
    - - cascading.tap.local.StdOutTap

All Implemented Interfaces:
  FlowElement, ScopedElement, Traceable, java.io.Serializable

    public class StdOutTap
    extends SinkTap<java.util.Properties,java.io.OutputStream>

Class StdOutTap provides a local mode tap for writing data to the `stdout` stream.

See Also:
  Serialized Form

### Constructor Summary

Constructors
Constructor and Description
`StdOutTap(Scheme<java.util.Properties,?,java.io.OutputStream,?,?> scheme)`

### Method Summary

Methods
`boolean` `createResource(java.util.Properties conf)` Method createResource creates the underlying resource.
`boolean` `deleteResource(java.util.Properties conf)` Method deleteResource deletes the resource represented by this instance.
`java.lang.String` `getIdentifier()` Method getIdentifier returns a String representing the resource this Tap instance represents.
`long` `getModifiedTime(java.util.Properties conf)` Method getModifiedTime returns the date this resource was last modified.
`TupleEntryCollector` `openForWrite(FlowProcess<? extends java.util.Properties> flowProcess, java.io.OutputStream output)` Method openForWrite opens the resource represented by this Tap instance for writing.
`boolean` `resourceExists(java.util.Properties conf)` Method resourceExists returns true if the path represented by this instance exists.

### Methods inherited from class cascading.tap.SinkTap

`getSourceFields, isSource, openForRead, prepareResourceForRead, sourceConfInit`

### Methods inherited from class cascading.tap.Tap

`commitResource, createResource, deleteResource, equals, flowConfInit, getConfigDef, getFullIdentifier, getFullIdentifier, getModifiedTime, getNodeConfigDef, getScheme, getSinkFields, getSinkMode, getStepConfigDef, getTrace, hasConfigDef, hashCode, hasNodeConfigDef, hasStepConfigDef, id, isKeep, isReplace, isSink, isTemporary, isUpdate, openForRead, openForWrite, outgoingScopeFor, prepareResourceForWrite, presentSinkFields, presentSourceFields, resolveIncomingOperationArgumentFields, resolveIncomingOperationPassThroughFields, resourceExists, retrieveSinkFields, retrieveSourceFields, rollbackResource, setScheme, sinkConfInit, taps, toString`

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

`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### StdOutTap

    public StdOutTap(Scheme<java.util.Properties,?,java.io.OutputStream,?,?> scheme)

### Method Detail

#### getIdentifier

    public java.lang.String getIdentifier()

Description copied from class: `Tap`
Method getIdentifier returns a String representing the resource this Tap instance represents.

Often, if the tap accesses a filesystem, the identifier is nothing more than the path to the file or directory. In other cases it may be a an URL or URI representing a connection string or remote resource.

Any two Tap instances having the same value for the identifier are considered equal.

Specified by:
  `getIdentifier` in class `Tap<java.util.Properties,java.lang.Void,java.io.OutputStream>`
Returns:
  String

#### openForWrite

    public TupleEntryCollector openForWrite(FlowProcess<? extends java.util.Properties> flowProcess,
                                   java.io.OutputStream output)
                                     throws java.io.IOException

Description copied from class: `Tap`
Method openForWrite opens the resource represented by this Tap instance for writing.

This method is used internally and does not honor the `SinkMode` setting. If SinkMode is `SinkMode.REPLACE`, this call may fail. See `Tap.openForWrite(cascading.flow.FlowProcess)`.

`output` value may be null, if so, sub-classes must inquire with the underlying `Scheme` via `Scheme.sinkConfInit(cascading.flow.FlowProcess, Tap, Object)` to get the proper output type and instantiate it before calling `super.openForWrite()`.

Specified by:
  `openForWrite` in class `Tap<java.util.Properties,java.lang.Void,java.io.OutputStream>`
Parameters:
  `flowProcess` - of type FlowProcess
  `output` - of type Output
Returns:
  TupleEntryCollector
Throws:
  `java.io.IOException` - when the resource cannot be opened

#### createResource

    public boolean createResource(java.util.Properties conf)
                           throws java.io.IOException

Description copied from class: `Tap`
Method createResource creates the underlying resource.

Specified by:
  `createResource` in class `Tap<java.util.Properties,java.lang.Void,java.io.OutputStream>`
Parameters:
  `conf` - of type Config
Returns:
  boolean
Throws:
  `java.io.IOException` - when there is an error making directories

#### deleteResource

    public boolean deleteResource(java.util.Properties conf)
                           throws java.io.IOException

Description copied from class: `Tap`
Method deleteResource deletes the resource represented by this instance.

Specified by:
  `deleteResource` in class `Tap<java.util.Properties,java.lang.Void,java.io.OutputStream>`
Parameters:
  `conf` - of type Config
Returns:
  boolean
Throws:
  `java.io.IOException` - when the resource cannot be deleted

#### resourceExists

    public boolean resourceExists(java.util.Properties conf)
                           throws java.io.IOException

Description copied from class: `Tap`
Method resourceExists returns true if the path represented by this instance exists.

Specified by:
  `resourceExists` in class `Tap<java.util.Properties,java.lang.Void,java.io.OutputStream>`
Parameters:
  `conf` - of type Config
Returns:
  true if the underlying resource already exists
Throws:
  `java.io.IOException` - when the status cannot be determined

#### getModifiedTime

    public long getModifiedTime(java.util.Properties conf)
                         throws java.io.IOException

Description copied from class: `Tap`
Method getModifiedTime returns the date this resource was last modified.

Specified by:
  `getModifiedTime` in class `Tap<java.util.Properties,java.lang.Void,java.io.OutputStream>`
Parameters:
  `conf` - of type Config
Returns:
  The date this resource was last modified.
Throws:
  `java.io.IOException`