public class CursorStreamWithProvider
extends org.mule.runtime.api.streaming.bytes.CursorStream
CursorStream that delegates to a CursorStream delegate and maintains a reference of the delegate to
its CursorStreamProvider.
The purpose of this class is to avoid the runtime to close the CursorStream before it is consumed. We achieve
this maintaining a hard reference of the CursorStream delegate to its CursorStreamProvider.
| Constructor and Description |
|---|
CursorStreamWithProvider(org.mule.runtime.api.streaming.bytes.CursorStream cursorStreamDelegate,
org.mule.runtime.api.streaming.bytes.CursorStreamProvider cursorStreamDelegateProvider) |
| Modifier and Type | Method and Description |
|---|---|
int |
available() |
void |
close() |
long |
getPosition() |
org.mule.runtime.api.streaming.CursorProvider |
getProvider() |
boolean |
isReleased() |
void |
mark(int readlimit) |
boolean |
markSupported() |
int |
read() |
int |
read(byte[] b) |
int |
read(byte[] b,
int off,
int len) |
void |
release() |
void |
reset() |
void |
seek(long position) |
long |
skip(long n) |
public CursorStreamWithProvider(org.mule.runtime.api.streaming.bytes.CursorStream cursorStreamDelegate,
org.mule.runtime.api.streaming.bytes.CursorStreamProvider cursorStreamDelegateProvider)
public int read(@NotNull
byte[] b)
throws IOException
read in class InputStreamIOExceptionpublic int read(@NotNull
byte[] b,
int off,
int len)
throws IOException
read in class InputStreamIOExceptionpublic long skip(long n)
throws IOException
skip in class InputStreamIOExceptionpublic int available()
throws IOException
available in class InputStreamIOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in interface org.mule.runtime.api.streaming.Cursorclose in class InputStreamIOExceptionpublic void mark(int readlimit)
mark in class InputStreampublic void reset()
throws IOException
reset in class InputStreamIOExceptionpublic boolean markSupported()
markSupported in class InputStreampublic int read()
throws IOException
read in class InputStreamIOExceptionpublic long getPosition()
public void seek(long position)
throws IOException
IOExceptionpublic void release()
public boolean isReleased()
public org.mule.runtime.api.streaming.CursorProvider getProvider()
Copyright © 2023 MuleSoft, Inc.. All rights reserved.