Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package com.fasterxml.jackson.core.io;
 
 import java.io.*;

Handler class that can be used to decorate input sources. Typical use is to use a filter abstraction (filtered stream, reader) around original input source, and apply additional processing during read operations.
public abstract class InputDecorator
    implements java.io.Serializable // since 2.1
    private static final long serialVersionUID = 1L;
    
    
Method called by com.fasterxml.jackson.core.JsonFactory instance when creating parser given an java.io.InputStream, when this decorator has been registered.

Parameters:
ctxt IO context in use (provides access to declared encoding). NOTE: at this point context may not have all information initialized; specifically auto-detected encoding is only available once parsing starts, which may occur only after this method is called.
in Original input source
Returns:
InputStream to use; either passed in argument, or something that calls it
    public abstract InputStream decorate(IOContext ctxtInputStream in)
        throws IOException;

    
Method called by com.fasterxml.jackson.core.JsonFactory instance when creating parser on given "raw" byte source. Method can either construct a java.io.InputStream for reading; or return null to indicate that no wrapping should occur.

Parameters:
ctxt IO context in use (provides access to declared encoding) NOTE: at this point context may not have all information initialized; specifically auto-detected encoding is only available once parsing starts, which may occur only after this method is called.
src Input buffer that contains contents to parse
offset Offset of the first available byte in the input buffer
length Number of bytes available in the input buffer
Returns:
Either java.io.InputStream to use as input source; or null to indicate that contents are to be processed as-is by caller
    public abstract InputStream decorate(IOContext ctxtbyte[] srcint offsetint length)
        throws IOException;
    
    
Method called by com.fasterxml.jackson.core.JsonFactory instance when creating parser given an java.io.Reader, when this decorator has been registered.

Parameters:
ctxt IO context in use (provides access to declared encoding) NOTE: at this point context may not have all information initialized; specifically auto-detected encoding is only available once parsing starts, which may occur only after this method is called.
src Original input source
Returns:
Reader to use; either passed in argument, or something that calls it (for example, a java.io.FilterReader)
    public abstract Reader decorate(IOContext ctxtReader srcthrows IOException;
New to GrepCode? Check out our FAQ X