OSDN Git Service

1.JMFライブラリのリファクタリング。
[nyartoolkit-and/nyartoolkit-and.git] / trunk / src.utils / jmf / jp / nyatla / nyartoolkit / jmf / utils / NyARBufferReader_Reader.java
1 /* \r
2  * PROJECT: NyARToolkit JMF utilities.\r
3  * --------------------------------------------------------------------------------\r
4  * The MIT License\r
5  * Copyright (c) 2008 nyatla\r
6  * airmail(at)ebony.plala.or.jp\r
7  * http://nyatla.jp/nyartoolkit/\r
8  * \r
9  * Permission is hereby granted, free of charge, to any person obtaining a copy\r
10  * of this software and associated documentation files (the "Software"), to deal\r
11  * in the Software without restriction, including without limitation the rights\r
12  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r
13  * copies of the Software, and to permit persons to whom the Software is\r
14  * furnished to do so, subject to the following conditions:\r
15  * The above copyright notice and this permission notice shall be included in\r
16  * all copies or substantial portions of the Software.\r
17  * \r
18  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r
19  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r
20  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r
21  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r
22  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r
23  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r
24  * THE SOFTWARE.\r
25  * \r
26  */\r
27 package jp.nyatla.nyartoolkit.jmf.utils;\r
28 \r
29 import jp.nyatla.nyartoolkit.core.rasterreader.INyARBufferReader;\r
30 import jp.nyatla.nyartoolkit.core.rasterreader.INyARRgbPixelReader;\r
31 import jp.nyatla.nyartoolkit.core.types.NyARIntSize;\r
32 \r
33 public abstract class NyARBufferReader_Reader implements INyARRgbPixelReader,INyARBufferReader\r
34 {\r
35         protected byte[] _ref_buf;\r
36         protected NyARIntSize _ref_size;\r
37         protected int _buf_type;\r
38         protected NyARBufferReader_Reader(NyARIntSize i_ref_size,int i_buf_type)\r
39         {\r
40                 this._ref_size =i_ref_size;\r
41                 this._buf_type=i_buf_type;\r
42                 return;\r
43         }\r
44         protected NyARBufferReader_Reader(NyARIntSize i_ref_size)\r
45         {\r
46                 this._ref_size =i_ref_size;\r
47                 return;\r
48         }\r
49         final public Object getBuffer()\r
50         {\r
51                 return this._ref_buf;\r
52         }\r
53         final public int getBufferType()\r
54         {\r
55                 return this._buf_type;\r
56         }\r
57         final public boolean isEqualBufferType(int i_type_value)\r
58         {\r
59                 return this._buf_type==i_type_value;\r
60         }\r
61         public abstract void changeBuffer(javax.media.Buffer i_buffer);\r
62 \r
63 }\r