Share via


PackagePart.GetStream 메서드

정의

파트 콘텐츠 데이터 스트림을 반환합니다.

오버로드

GetStream()

파트 콘텐츠 데이터 스트림을 반환합니다.

GetStream(FileMode)

지정된 I/O FileMode에서 열린 콘텐츠 스트림을 반환합니다.

GetStream(FileMode, FileAccess)

지정된 FileModeFileAccess로 열린 파트 콘텐츠 스트림을 반환합니다.

GetStream()

Source:
PackagePart.cs
Source:
PackagePart.cs
Source:
PackagePart.cs

파트 콘텐츠 데이터 스트림을 반환합니다.

public:
 System::IO::Stream ^ GetStream();
public System.IO.Stream GetStream ();
member this.GetStream : unit -> System.IO.Stream
Public Function GetStream () As Stream

반환

파트의 콘텐츠 데이터 스트림입니다.

예외

파트가 삭제된 경우

또는

Package가 열려 있지 않은 경우(Dispose(Boolean) 또는 Close()가 호출된 경우)

파생된 서브클래스의 GetStreamCore(FileMode, FileAccess) 메서드에서 반환한 스트림 개체가 null인 경우

설명

이 메서드는 의 및 사용 권한이 부모 PackageFileAccess 동일한 콘텐츠 스트림 FileModeOpenOrCreate 을 엽니다.

오버로드 GetStream 메서드를 사용하면 특정 FileMode를 설정할 수 있습니다.

호출자 참고

GetStream() 파생된 메서드를 GetStreamCore(FileMode, FileAccess) 내부적으로 호출하여 파생 클래스에 구현된 물리적 형식에 따라 파트 데이터 스트림을 실제로 열고 반환합니다.

기본적으로 추상 PackagePart 클래스의 ZipPackagePart 하위 클래스 구현이 제공되고 사용됩니다. 기본 작업 GetStream() 에서 내부적으로 클래스를 ZipPackagePart 호출 GetStreamCore(FileMode, FileAccess) 하여 ZIP 파일에서 파트 데이터 스트림을 열고 반환합니다.

적용 대상

GetStream(FileMode)

Source:
PackagePart.cs
Source:
PackagePart.cs
Source:
PackagePart.cs

지정된 I/O FileMode에서 열린 콘텐츠 스트림을 반환합니다.

public:
 System::IO::Stream ^ GetStream(System::IO::FileMode mode);
public System.IO.Stream GetStream (System.IO.FileMode mode);
member this.GetStream : System.IO.FileMode -> System.IO.Stream
Public Function GetStream (mode As FileMode) As Stream

매개 변수

mode
FileMode

콘텐츠 스트림을 열 I/O 모드입니다.

반환

파트의 콘텐츠 스트림입니다.

예외

파트가 삭제된 경우

또는

Package가 열려 있지 않은 경우(Dispose(Boolean) 또는 Close()가 호출된 경우)

mode 매개 변수가 유효한 FileMode 열거형 값이 아닌 경우

mode 매개 변수가 패키지 및 파트 스트림과 호환되지 않는 경우

또는

파생된 서브클래스의 GetStreamCore(FileMode, FileAccess) 메서드에서 반환한 스트림 개체가 null인 경우

설명

FileAccess 반환된 콘텐츠 스트림의 사용 권한은 부모 Package의 사용 권한과 동일합니다.

호출자 참고

GetStream(FileMode) 파생된 메서드를 GetStreamCore(FileMode, FileAccess) 내부적으로 호출하여 파생 클래스에 구현된 물리적 형식에 따라 파트 데이터 스트림을 실제로 열고 반환합니다.

기본적으로 추상 PackagePart 클래스의 ZipPackagePart 하위 클래스 구현이 제공되고 사용됩니다. 기본 작업 GetStream(FileMode) 에서 내부적으로 클래스를 ZipPackagePart 호출 GetStreamCore(FileMode, FileAccess) 하여 ZIP 파일에서 파트 데이터 스트림을 열고 반환합니다.

적용 대상

GetStream(FileMode, FileAccess)

Source:
PackagePart.cs
Source:
PackagePart.cs
Source:
PackagePart.cs

지정된 FileModeFileAccess로 열린 파트 콘텐츠 스트림을 반환합니다.

public:
 System::IO::Stream ^ GetStream(System::IO::FileMode mode, System::IO::FileAccess access);
public System.IO.Stream GetStream (System.IO.FileMode mode, System.IO.FileAccess access);
member this.GetStream : System.IO.FileMode * System.IO.FileAccess -> System.IO.Stream
Public Function GetStream (mode As FileMode, access As FileAccess) As Stream

매개 변수

mode
FileMode

콘텐츠 스트림을 열 I/O 모드입니다.

access
FileAccess

콘텐츠 스트림을 열 때 사용하는 액세스 권한입니다.

반환

파트의 콘텐츠 스트림입니다.

예외

파트가 삭제된 경우

또는

Package가 열려 있지 않은 경우(Dispose(Boolean) 또는 Close()가 호출된 경우)

mode 매개 변수가 유효한 FileMode 열거형 값이 아닌 경우

또는

access 매개 변수가 유효한 FileAccess 열거형 값이 아닌 경우

mode 또는 access가 패키지 및 파트 스트림과 호환되지 않는 경우

또는

access 매개 변수가 Read로 지정되었지만 mode 매개 변수에서 쓰기 권한을 필요로 하는 경우. FileMode, Create, CreateNew, 그리고 TruncateAppend 값에는 Write 또는 ReadWrite 액세스가 필요합니다.

또는

파생된 서브클래스의 GetStreamCore(FileMode, FileAccess) 메서드에서 반환한 스트림 개체가 null인 경우

호출자 참고

GetStream(FileMode, FileAccess) 파생된 메서드를 GetStreamCore(FileMode, FileAccess) 내부적으로 호출하여 파생 클래스에 구현된 물리적 형식에 따라 파트 데이터 스트림을 실제로 열고 반환합니다.

기본적으로 추상 PackagePart 클래스의 ZipPackagePart 하위 클래스 구현이 제공되고 사용됩니다. 기본 작업 GetStream(FileMode, FileAccess) 에서 내부적으로 클래스를 ZipPackagePart 호출 GetStreamCore(FileMode, FileAccess) 하여 ZIP 파일에서 파트 데이터 스트림을 열고 반환합니다.

적용 대상