ToBase64Transform.TransformFinalBlock(Byte[], Int32, Int32) 方法

定义

将指定字节数组的指定区域转换为 Base 64。Converts the specified region of the specified byte array to base 64.

public:
 virtual cli::array <System::Byte> ^ TransformFinalBlock(cli::array <System::Byte> ^ inputBuffer, int inputOffset, int inputCount);
public byte[] TransformFinalBlock (byte[] inputBuffer, int inputOffset, int inputCount);
abstract member TransformFinalBlock : byte[] * int * int -> byte[]
override this.TransformFinalBlock : byte[] * int * int -> byte[]
Public Function TransformFinalBlock (inputBuffer As Byte(), inputOffset As Integer, inputCount As Integer) As Byte()

参数

inputBuffer
Byte[]

要转换为 Base 64 的输入。The input to convert to base 64.

inputOffset
Int32

字节数组中的偏移量,从该位置开始使用数据。The offset into the byte array from which to begin using data.

inputCount
Int32

字节数组中用作数据的字节数。The number of bytes in the byte array to use as data.

返回

Byte[]

已计算的 Base 64 转换。The computed base 64 conversion.

实现

异常

已释放当前的 ToBase64Transform 对象。The current ToBase64Transform object has already been disposed.

inputBuffer 参数包含无效偏移量长度。The inputBuffer parameter contains an invalid offset length.

-or- inputCount 参数包含无效值。The inputCount parameter contains an invalid value.

inputBuffer 参数为 nullThe inputBuffer parameter is null.

inputBuffer 参数需要非负数。The inputBuffer parameter requires a non-negative number.

示例

下面的代码示例演示如何调用TransformFinalBlock方法来转换最终数据块。The following code example demonstrates how to call the TransformFinalBlock method to transform the final block of data. 此代码示例是为ToBase64Transform类提供的更大示例的一部分。This code example is part of a larger example provided for the ToBase64Transform class.

outputBytes = base64Transform->TransformFinalBlock(
   inputBytes,
   inputOffset,
   inputBytes->Length - inputOffset );
outputBytes = base64Transform.TransformFinalBlock(
    inputBytes,
    inputOffset,
    inputBytes.Length - inputOffset);
outputBytes = base64Transform.TransformFinalBlock( _
    inputBytes, _
    inputOffset, _
    inputBytes.Length - inputOffset)

适用于

另请参阅