File Source: MediacastResource.java
/*
P/P * Method: org.apache.roller.weblogger.util.MediacastResource__static_init
*/
1 /*
2 * Licensed to the Apache Software Foundation (ASF) under one or more
3 * contributor license agreements. The ASF licenses this file to You
4 * under the Apache License, Version 2.0 (the "License"); you may not
5 * use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License. For additional information regarding
15 * copyright in this work, please see the NOTICE file in the top level
16 * directory of this distribution.
17 */
18
19 package org.apache.roller.weblogger.util;
20
21
22 /**
23 * An external 'mediacast' resource, typically a podcast, video, etc.
24 *
25 * This class is mainly used by weblog entries to track external resources used
26 * in postings via enclosures.
27 */
28 public class MediacastResource {
29
30 private String url = null;
31 private String contentType = null;
32 private long length = 0;
33
34
/*
P/P * Method: void org.apache.roller.weblogger.util.MediacastResource(String, String, long)
*
* Postconditions:
* this.contentType == c
* init'ed(this.contentType)
* this.length == l
* init'ed(this.length)
* this.url == u
* init'ed(this.url)
*/
35 public MediacastResource(String u, String c, long l) {
36 this.setUrl(u);
37 this.setContentType(c);
38 this.setLength(l);
39 }
40
41
42 public String getUrl() {
/*
P/P * Method: String getUrl()
*
* Preconditions:
* init'ed(this.url)
*
* Postconditions:
* return_value == this.url
* init'ed(return_value)
*/
43 return url;
44 }
45
46 public void setUrl(String url) {
/*
P/P * Method: void setUrl(String)
*
* Postconditions:
* this.url == url
* init'ed(this.url)
*/
47 this.url = url;
48 }
49
50 public String getContentType() {
/*
P/P * Method: String getContentType()
*
* Preconditions:
* init'ed(this.contentType)
*
* Postconditions:
* return_value == this.contentType
* init'ed(return_value)
*/
51 return contentType;
52 }
53
54 public void setContentType(String contentType) {
/*
P/P * Method: void setContentType(String)
*
* Postconditions:
* this.contentType == contentType
* init'ed(this.contentType)
*/
55 this.contentType = contentType;
56 }
57
58 public long getLength() {
/*
P/P * Method: long getLength()
*
* Preconditions:
* init'ed(this.length)
*
* Postconditions:
* return_value == this.length
* init'ed(return_value)
*/
59 return length;
60 }
61
62 public void setLength(long length) {
/*
P/P * Method: void setLength(long)
*
* Postconditions:
* this.length == length
* init'ed(this.length)
*/
63 this.length = length;
64 }
65
66
67 public String toString() {
/*
P/P * Method: String toString()
*
* Preconditions:
* init'ed(this.contentType)
* init'ed(this.length)
* init'ed(this.url)
*
* Postconditions:
* java.lang.StringBuffer:toString(...)._tainted == this.url._tainted | this.contentType._tainted
* init'ed(java.lang.StringBuffer:toString(...)._tainted)
* return_value == &java.lang.StringBuffer:toString(...)
*/
68 StringBuffer buf = new StringBuffer();
69
70 buf.append("url = ").append(getUrl()).append("\n");
71 buf.append("contentType = ").append(getContentType()).append("\n");
72 buf.append("length = ").append(getLength()).append("\n");
73
74 return buf.toString();
75 }
76
77 }
SofCheck Inspector Build Version : 2.18479
| MediacastResource.java |
2009-Jan-02 14:25:28 |
| MediacastResource.class |
2009-Sep-04 03:12:32 |