public class StreamWriter
extends java.lang.Object
| Modifier and Type | Field and Description | 
|---|---|
| protected StreamManager.StreamRateLimiter | limiter | 
| protected java.util.Collection<Pair<java.lang.Long,java.lang.Long>> | sections | 
| protected StreamSession | session | 
| protected SSTableReader | sstable | 
| Constructor and Description | 
|---|
| StreamWriter(SSTableReader sstable,
            java.util.Collection<Pair<java.lang.Long,java.lang.Long>> sections,
            StreamSession session) | 
| Modifier and Type | Method and Description | 
|---|---|
| protected long | totalSize() | 
| void | write(DataOutputStreamPlus output)Stream file of specified sections to given channel. | 
| protected long | write(RandomAccessReader reader,
     DataIntegrityMetadata.ChecksumValidator validator,
     int start,
     long length,
     long bytesTransferred)Sequentially read bytes from the file and write them to the output stream | 
protected final SSTableReader sstable
protected final java.util.Collection<Pair<java.lang.Long,java.lang.Long>> sections
protected final StreamManager.StreamRateLimiter limiter
protected final StreamSession session
public StreamWriter(SSTableReader sstable, java.util.Collection<Pair<java.lang.Long,java.lang.Long>> sections, StreamSession session)
public void write(DataOutputStreamPlus output) throws java.io.IOException
output - where this writes data tojava.io.IOException - on any I/O errorprotected long totalSize()
protected long write(RandomAccessReader reader, DataIntegrityMetadata.ChecksumValidator validator, int start, long length, long bytesTransferred) throws java.io.IOException
reader - The file reader to read fromvalidator - validator to verify data integritystart - number of bytes to skip transfer, but include for validation.length - The full length that should be read from readerbytesTransferred - Number of bytes already read out of lengthjava.io.IOException - on any I/O errorCopyright © 2018 The Apache Software Foundation