## Stream::CopyTo(const SharedPtr\<Stream\>\&) method


Copies bytes to the specified stream.

```cpp
void System::IO::Stream::CopyTo(const SharedPtr<Stream> &destination)
```


| Parameter | Type | Description |
| --- | --- | --- |
| destination | const SharedPtr\<Stream\>\& | [Stream](../) to which data will be copied. |

## See Also

* Typedef [SharedPtr](../../../system/sharedptr/)
* Class [Stream](../)
* Class [Stream](../)
* Namespace [System::IO](../../)
* Library [Aspose.PDF for C++](../../../)
## Stream::CopyTo(const SharedPtr\<Stream\>\&, int32_t) method


Copies bytes to the specified stream, using the specified buffer size.

```cpp
void System::IO::Stream::CopyTo(const SharedPtr<Stream> &destination, int32_t buffer_size)
```


| Parameter | Type | Description |
| --- | --- | --- |
| destination | const SharedPtr\<Stream\>\& | [Stream](../) to which data will be copied. |
| buffer_size | int32_t | Size of the buffer. |

## See Also

* Typedef [SharedPtr](../../../system/sharedptr/)
* Class [Stream](../)
* Class [Stream](../)
* Namespace [System::IO](../../)
* Library [Aspose.PDF for C++](../../../)
