コード例 #1
0
 /// <exception cref="EncodingNotSupportedException">Thrown if the encoding is not supported by the platform.</exception>
 internal string ReadPlain(string path, out Encoding encoding)
 {
     using (FileStream fileStream = FileInputOutput.OpenFileForReading(path)) {
         SubtitleFormat format = null;
         return(ReadSubtitleText(false, fileStream, out encoding, out format));
     }
 }
コード例 #2
0
 /// <exception cref="EncodingNotSupportedException">Thrown if the encoding is not supported by the platform.</exception>
 internal string ReadPlain(string path, Encoding encoding)
 {
     using (FileStream fileStream = FileInputOutput.OpenFileForReading(path)) {
         return(TestEncoding(fileStream, encoding));
     }
 }
コード例 #3
0
 /// <exception cref="UnknownSubtitleFormatException">Thrown if the subtitle format could not be detected.</exception>
 internal string Read(string path, Encoding encoding, out SubtitleFormat format)
 {
     using (FileStream fileStream = FileInputOutput.OpenFileForReading(path)) {
         return(TestEncoding(fileStream, encoding, out format));
     }
 }
コード例 #4
0
 /// <exception cref="EncodingNotSupportedException">Thrown if the encoding is not supported by the platform.</exception>
 /// <exception cref="UnknownSubtitleFormatException">Thrown if the subtitle format could not be detected.</exception>
 internal string Read(string path, out Encoding encoding, out SubtitleFormat format)
 {
     using (FileStream fileStream = FileInputOutput.OpenFileForReading(path)) {
         return(ReadSubtitleText(true, fileStream, out encoding, out format));
     }
 }