KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > axis > attachments > DynamicContentDataHandler


1 /*
2  * Copyright 2001-2004 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not 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.
15  */

16 package org.apache.axis.attachments;
17
18 import java.net.URL JavaDoc;
19
20 import javax.activation.DataHandler JavaDoc;
21 import javax.activation.DataSource JavaDoc;
22
23 /**
24  * To be used with writing out DIME Attachments.
25  *
26  * AXIS will use DIME record chunking.
27  *
28  * @author Marc Dumontier (mrdumont@blueprint.org)
29  *
30  */

31 public class DynamicContentDataHandler extends DataHandler JavaDoc {
32
33     int chunkSize = 1*1024*1024;
34     
35     /**
36      * @param arg0
37      */

38     public DynamicContentDataHandler(DataSource JavaDoc arg0) {
39         super(arg0);
40     }
41
42     /**
43      * @param arg0
44      * @param arg1
45      */

46     public DynamicContentDataHandler(Object JavaDoc arg0, String JavaDoc arg1) {
47         super(arg0, arg1);
48     }
49
50     /**
51      * @param arg0
52      */

53     public DynamicContentDataHandler(URL JavaDoc arg0) {
54         super(arg0);
55     }
56
57     /**
58      * Get the DIME record chunk size
59      * @return The value
60      */

61     public int getChunkSize() {
62         return chunkSize;
63     }
64     
65     /**
66      * Set the DIME record chunk size
67      * @param chunkSize The value.
68      */

69     public void setChunkSize(int chunkSize) {
70         this.chunkSize = chunkSize;
71     }
72 }
73
Popular Tags