@PatternRegex(value="(?is)^(?<title>.+)( (?<episodeNumber>S[0-9]+E[0-9]+))( (?<origAirDate>[0-9]{8}))( \\[(?<startTime>[0-9]{8}-[0-9]{4})\\])[.]mpg$") public class HDHRRecording extends FileDataSource implements DataSourceDefaultMethods, PatternMatcherBean
Name | Mode | Type | isHidden | isBound | isConstrained |
---|---|---|---|---|---|
contentType | R | String | false | false | false |
file | R | File | false | false | false |
fileTypeMap | W | FileTypeMap | false | false | false |
inputStream | R | InputStream | false | false | false |
name | R | String | false | false | false |
offset | R | long | false | false | false |
outputStream | R | OutputStream | false | false | false |
APPLICATION_OCTET_STREAM, APPLICATION_XML, CONTENT_TYPE, TEXT_HTML, TEXT_PLAIN
Constructor and Description |
---|
HDHRRecording(File file)
Sole constructor.
|
Modifier and Type | Method and Description |
---|---|
InputStream |
getInputStream() |
long |
getOffset() |
OutputStream |
getOutputStream() |
protected void |
setEpisodeNumber(String string) |
protected void |
setEpisodeTitle(String string) |
protected void |
setOrigAirDate(String string) |
protected void |
setStartTime(String string) |
protected void |
setTitle(String string) |
String |
toString() |
getContentType, getFile, getName, setFileTypeMap
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
clear, getInputStream, getOutputStream, length, setContentType, setName, wrap, wrap, writeTo
getContentType, getName
initialize, matcher, pattern
public HDHRRecording(File file) throws IOException
file
- The recording File
.IOException
- If the recording metadata cannot be read.@MatcherGroup(value=1) protected void setTitle(String string)
protected void setEpisodeTitle(String string)
@MatcherGroup(value=3) protected void setEpisodeNumber(String string)
@MatcherGroup(value=5) protected void setOrigAirDate(String string)
@MatcherGroup(value=7) protected void setStartTime(String string)
public long getOffset()
public InputStream getInputStream() throws IOException
getInputStream
in interface DataSourceDefaultMethods
getInputStream
in interface DataSource
getInputStream
in class FileDataSource
IOException
public OutputStream getOutputStream() throws IOException
getOutputStream
in interface DataSourceDefaultMethods
getOutputStream
in interface DataSource
getOutputStream
in class FileDataSource
IOException
Copyright © 2015–2020 Allen D. Ball. All rights reserved.