C# 클래스 Plupload.PngEncoder.DeflaterOutputStream

A special stream deflating or compressing the bytes that are written to it. It uses a Deflater to perform actual deflating.
Authors of the original java version : Tom Tromey, Jochen Hoenicke
상속: Stream
파일 보기 프로젝트 열기: akoch-ov/dipstart-development 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
baseOutputStream_ Stream
deflater_ Deflater

공개 메소드들

메소드 설명
BeginRead ( byte buffer, int offset, int count, AsyncCallback callback, object state ) : IAsyncResult

Asynchronous reads are not supported a NotSupportedException is always thrown

BeginWrite ( byte buffer, int offset, int count, AsyncCallback callback, object state ) : IAsyncResult

Asynchronous writes arent supported, a NotSupportedException is always thrown

Close ( ) : void

Calls Finish and closes the underlying stream when is true.

DeflaterOutputStream ( Stream baseOutputStream ) : System

Creates a new DeflaterOutputStream with a default Deflater and default buffer size.

DeflaterOutputStream ( Stream baseOutputStream, Deflater deflater ) : System

Creates a new DeflaterOutputStream with the given Deflater and default buffer size.

DeflaterOutputStream ( Stream baseOutputStream, Deflater deflater, int bufferSize ) : System

Creates a new DeflaterOutputStream with the given Deflater and buffer size.

Finish ( ) : void

Finishes the stream by calling finish() on the deflater.

Flush ( ) : void

Flushes the stream by calling Flush on the deflater and then on the underlying stream. This ensures that all bytes are flushed.

Read ( byte buffer, int offset, int count ) : int

Read a block of bytes from stream

ReadByte ( ) : int

Read a byte from stream advancing position by one

Seek ( long offset, SeekOrigin origin ) : long

Sets the current position of this stream to the given value. Not supported by this class!

SetLength ( long value ) : void

Sets the length of this stream to the given value. Not supported by this class!

Write ( byte buffer, int offset, int count ) : void

Writes bytes from an array to the compressed stream.

WriteByte ( byte value ) : void

Writes a single byte to the compressed output stream.

보호된 메소드들

메소드 설명
Deflate ( ) : void

Deflates everything in the input buffers. This will call def.deflate() until all bytes from the input buffers are processed.

EncryptBlock ( byte buffer, int offset, int length ) : void

Encrypt a block of data

EncryptByte ( ) : byte

Encrypt a single byte

UpdateKeys ( byte ch ) : void

Update encryption keys

메소드 상세

BeginRead() 공개 메소드

Asynchronous reads are not supported a NotSupportedException is always thrown
Any access
public BeginRead ( byte buffer, int offset, int count, AsyncCallback callback, object state ) : IAsyncResult
buffer byte The buffer to read into.
offset int The offset to start storing data at.
count int The number of bytes to read
callback AsyncCallback The async callback to use.
state object The state to use.
리턴 IAsyncResult

BeginWrite() 공개 메소드

Asynchronous writes arent supported, a NotSupportedException is always thrown
Any access
public BeginWrite ( byte buffer, int offset, int count, AsyncCallback callback, object state ) : IAsyncResult
buffer byte The buffer to write.
offset int The offset to begin writing at.
count int The number of bytes to write.
callback AsyncCallback The to use.
state object The state object.
리턴 IAsyncResult

Close() 공개 메소드

Calls Finish and closes the underlying stream when is true.
public Close ( ) : void
리턴 void

Deflate() 보호된 메소드

Deflates everything in the input buffers. This will call def.deflate() until all bytes from the input buffers are processed.
protected Deflate ( ) : void
리턴 void

DeflaterOutputStream() 공개 메소드

Creates a new DeflaterOutputStream with a default Deflater and default buffer size.
public DeflaterOutputStream ( Stream baseOutputStream ) : System
baseOutputStream Stream /// the output stream where deflated output should be written. ///
리턴 System

DeflaterOutputStream() 공개 메소드

Creates a new DeflaterOutputStream with the given Deflater and default buffer size.
public DeflaterOutputStream ( Stream baseOutputStream, Deflater deflater ) : System
baseOutputStream Stream /// the output stream where deflated output should be written. ///
deflater Deflater /// the underlying deflater. ///
리턴 System

DeflaterOutputStream() 공개 메소드

Creates a new DeflaterOutputStream with the given Deflater and buffer size.
/// bufsize is less than or equal to zero. /// /// baseOutputStream does not support writing /// /// deflater instance is null ///
public DeflaterOutputStream ( Stream baseOutputStream, Deflater deflater, int bufferSize ) : System
baseOutputStream Stream /// The output stream where deflated output is written. ///
deflater Deflater /// The underlying deflater to use ///
bufferSize int /// The buffer size to use when deflating ///
리턴 System

EncryptBlock() 보호된 메소드

Encrypt a block of data
protected EncryptBlock ( byte buffer, int offset, int length ) : void
buffer byte /// Data to encrypt. NOTE the original contents of the buffer are lost ///
offset int /// Offset of first byte in buffer to encrypt ///
length int /// Number of bytes in buffer to encrypt ///
리턴 void

EncryptByte() 보호된 메소드

Encrypt a single byte
protected EncryptByte ( ) : byte
리턴 byte

Finish() 공개 메소드

Finishes the stream by calling finish() on the deflater.
/// Not all input is deflated ///
public Finish ( ) : void
리턴 void

Flush() 공개 메소드

Flushes the stream by calling Flush on the deflater and then on the underlying stream. This ensures that all bytes are flushed.
public Flush ( ) : void
리턴 void

Read() 공개 메소드

Read a block of bytes from stream
Any access
public Read ( byte buffer, int offset, int count ) : int
buffer byte The buffer to store read data in.
offset int The offset to start storing at.
count int The maximum number of bytes to read.
리턴 int

ReadByte() 공개 메소드

Read a byte from stream advancing position by one
Any access
public ReadByte ( ) : int
리턴 int

Seek() 공개 메소드

Sets the current position of this stream to the given value. Not supported by this class!
Any access
public Seek ( long offset, SeekOrigin origin ) : long
offset long The offset relative to the to seek.
origin SeekOrigin The to seek from.
리턴 long

SetLength() 공개 메소드

Sets the length of this stream to the given value. Not supported by this class!
Any access
public SetLength ( long value ) : void
value long The new stream length.
리턴 void

UpdateKeys() 보호된 메소드

Update encryption keys
protected UpdateKeys ( byte ch ) : void
ch byte
리턴 void

Write() 공개 메소드

Writes bytes from an array to the compressed stream.
public Write ( byte buffer, int offset, int count ) : void
buffer byte /// The byte array ///
offset int /// The offset into the byte array where to start. ///
count int /// The number of bytes to write. ///
리턴 void

WriteByte() 공개 메소드

Writes a single byte to the compressed output stream.
public WriteByte ( byte value ) : void
value byte /// The byte value. ///
리턴 void

프로퍼티 상세

baseOutputStream_ 보호되어 있는 프로퍼티

Base stream the deflater depends on.
protected Stream baseOutputStream_
리턴 Stream

deflater_ 보호되어 있는 프로퍼티

The deflater which is used to deflate the stream.
protected Deflater,Plupload.PngEncoder deflater_
리턴 Deflater