Package io.protostuff

Class Pipe

java.lang.Object
io.protostuff.Pipe

public abstract class Pipe extends Object
Transfers data from an Input to an Output.

It is recommended to use pipe only to stream data coming from server-side services (e.g from your datastore/etc).

Incoming data from the interwebs should not be piped due to validation/security purposes.

  • Field Details

    • input

      protected Input input
    • output

      protected Output output
  • Constructor Details

    • Pipe

      public Pipe()
  • Method Details

    • reset

      protected Pipe reset()
      Resets this pipe for re-use.
    • begin

      protected abstract Input begin(Pipe.Schema<?> pipeSchema) throws IOException
      Begin preliminary input processing.
      Throws:
      IOException
    • end

      protected abstract void end(Pipe.Schema<?> pipeSchema, Input input, boolean cleanupOnly) throws IOException
      End input processing.

      If cleanupOnly is true, the io processing ended prematurely hence the underlying pipe should cleanup/close all resources that need to be.

      Throws:
      IOException
    • transferDirect

      public static <T> void transferDirect(Pipe.Schema<T> pipeSchema, Pipe pipe, Input input, Output output) throws IOException
      This should not be called directly by applications.
      Throws:
      IOException