## Read(byte[]) {#read}

读取字节以填充指定的字节缓冲区。

```csharp
public virtual int Read(byte[] bytes)
```

| 范围 | 类型 | 描述 |
| --- | --- | --- |
| bytes | Byte[] | 要填充的字节。 |

### 返回值

读取的字节数。如果流中没有足够的字节，则此值可能小于缓冲区中的字节数。

### 也可以看看

* class [StreamContainer](../)
* 命名空间 [Aspose.PSD](../../streamcontainer/)
* 部件 [Aspose.PSD](../../../)

---

## Read(byte[], int, int) {#read_1}

从当前流中读取字节序列，并将流中的位置按读取的字节数前进。

```csharp
public virtual int Read(byte[] buffer, int offset, int count)
```

| 范围 | 类型 | 描述 |
| --- | --- | --- |
| buffer | Byte[] | 字节数组。当此方法返回时，缓冲区包含指定的字节数组，其值介于*offset*和 （*offset* +*count* - 1) 替换为从当前源读取的字节。 |
| offset | Int32 | 从零开始的字节偏移量*buffer*从哪里开始存储从当前流中读取的数据。 |
| count | Int32 | 要从当前流中读取的最大字节数。 |

### 返回值

读入缓冲区的字节总数。如果当前没有那么多字节可用，则这可能小于请求的字节数，或者如果已到达流的末尾，则为零 (0)。

### 也可以看看

* class [StreamContainer](../)
* 命名空间 [Aspose.PSD](../../streamcontainer/)
* 部件 [Aspose.PSD](../../../)


