PipelineBuffer.GetBlobData(Int32, Int32, Int32) 메서드
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
컬럼에 PipelineBuffer 저장된 이진 큰 객체(BLOB)에서 바이트 배열을 가져옵니다.
public:
cli::array <System::Byte> ^ GetBlobData(int columnIndex, int offset, int count);
public byte[] GetBlobData(int columnIndex, int offset, int count);
member this.GetBlobData : int * int * int -> byte[]
Public Function GetBlobData (columnIndex As Integer, offset As Integer, count As Integer) As Byte()
매개 변수
- columnIndex
- Int32
BLOB을 포함하는 열의 인덱스입니다.
- offset
- Int32
BLOB에서 바이트를 가져오기 시작하는 지점입니다.
- count
- Int32
BLOB에서 가져와야 할 바이트 수입니다.
반품
열의 PipelineBuffer 바이트 배열입니다.
예제
다음 예시는 열에서 PipelineBuffer 전체 바이트 배열을 가져옵니다.
public override void ProcessInput(int inputID, PipelineBuffer buffer)
{
IDTSInput100 input = ComponentMetaData.InputCollection.GetObjectByID(inputID);
foreach (IDTSInputColumn100 col in input.InputColumnCollection)
{
int index = BufferManager.FindColumnByLineageID(input.Buffer, col.LineageID);
BufferColumn bc = buffer.GetColumnInfo(index);
if (bc.DataType == DataType.DT_IMAGE)
{
uint blobLength = buffer.GetBlobLength(index);
byte [] blobBytes = buffer.GetBlobData(index, 0, (int)blobLength);
//TODO: Do something with the blob data.
}
}
}
Public Overrides Sub ProcessInput(ByVal inputID As Integer, ByVal buffer As PipelineBuffer)
Dim input As IDTSInput100 = ComponentMetaData.InputCollection.GetObjectByID(inputID)
For Each col As IDTSInputColumn100 In input.InputColumnCollection
Dim index As Integer = BufferManager.FindColumnByLineageID(input.Buffer, col.LineageID)
Dim bc As BufferColumn = buffer.GetColumnInfo(index)
If bc.DataType = DataType.DT_IMAGE Then
Dim blobLength As System.UInt32 = buffer.GetBlobLength(index)
Dim blobBytes As Byte() = buffer.GetBlobData(index, 0, CType(blobLength, Integer))
'TODO: Do something with the blob data
End If
Next
End Sub
설명
이 방법은 다음과 같은 통합 서비스 데이터 유형과 함께 작동합니다:
BLOB이 포함된 열에서 PipelineBuffer 데이터를 가져올 때, DT_IMAGE매개변수와 함께 BLOB offset 의 시작 위치와 해당 매개변수에서 count 검색할 바이트 수를 지정합니다.
통합 서비스 데이터 타입의 전체 목록과 각 타입에 사용할 클래스의 PipelineBuffer 대응 Get 하는 메서드 및 Set 방법은 Data Flow에서 데이터 타입 작업 항목을 참조하세요.