1 package nom.tam.util;
2
3 /*
4 * #%L
5 * nom.tam FITS library
6 * %%
7 * Copyright (C) 1996 - 2024 nom-tam-fits
8 * %%
9 * This is free and unencumbered software released into the public domain.
10 *
11 * Anyone is free to copy, modify, publish, use, compile, sell, or
12 * distribute this software, either in source code form or as a compiled
13 * binary, for any purpose, commercial or non-commercial, and by any
14 * means.
15 *
16 * In jurisdictions that recognize copyright laws, the author or authors
17 * of this software dedicate any and all copyright interest in the
18 * software to the public domain. We make this dedication for the benefit
19 * of the public at large and to the detriment of our heirs and
20 * successors. We intend this dedication to be an overt act of
21 * relinquishment in perpetuity of all present and future rights to this
22 * software under copyright law.
23 *
24 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
25 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
26 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
27 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
28 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
29 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
30 * OTHER DEALINGS IN THE SOFTWARE.
31 * #L%
32 */
33
34 import java.io.File;
35 import java.io.IOException;
36
37 /**
38 * @deprecated Use {@link FitsFile} instead, which replaces the old <code>BufferedFile</code> with a less misleading
39 * name, or else {@link ArrayDataFile}, which provides a base for a more more generic implementation for
40 * efficient reading/writing arrays using any (non-FITS) encoding.
41 *
42 * @see FitsFile
43 */
44 @Deprecated
45 public class BufferedFile extends FitsFile {
46
47 /**
48 * Constructs a buffered FITS file
49 *
50 * @param file the underlying file
51 * @param mode the access mode as a string, e.g. "rw"
52 * @param bufferSize the buffer size in bytes
53 *
54 * @throws IOException if there was an error opening the file
55 */
56 @Deprecated
57 public BufferedFile(File file, String mode, int bufferSize) throws IOException {
58 super(file, mode, bufferSize);
59 }
60
61 /**
62 * Constructs a buffered FITS file with the default buffer size.
63 *
64 * @param file the underlying file
65 * @param mode the access mode as a string, e.g. "rw"
66 *
67 * @throws IOException if there was an error opening the file
68 */
69 @Deprecated
70 public BufferedFile(File file, String mode) throws IOException {
71 super(file, mode);
72 }
73
74 /**
75 * Constructs a buffered FITS file with the default buffer size and default access mode.
76 *
77 * @param file the underlying file
78 *
79 * @throws IOException if there was an error opening the file
80 */
81 @Deprecated
82 public BufferedFile(File file) throws IOException {
83 super(file);
84 }
85
86 /**
87 * Constructs a buffered FITS file
88 *
89 * @param filename the file name / path
90 * @param mode the access mode as a string, e.g. "rw"
91 * @param bufferSize the buffer size in bytes
92 *
93 * @throws IOException if there was an error opening the file
94 */
95 @Deprecated
96 public BufferedFile(String filename, String mode, int bufferSize) throws IOException {
97 super(filename, mode, bufferSize);
98 }
99
100 /**
101 * Constructs a buffered FITS file with the default buffer size
102 *
103 * @param filename the file name / path
104 * @param mode the access mode as a string, e.g. "rw"
105 *
106 * @throws IOException if there was an error opening the file
107 */
108 @Deprecated
109 public BufferedFile(String filename, String mode) throws IOException {
110 super(filename, mode);
111 }
112
113 /**
114 * Constructs a buffered FITS file with the default buffer size and default access mode
115 *
116 * @param filename the file name / path
117 *
118 * @throws IOException if there was an error opening the file
119 */
120 @Deprecated
121 public BufferedFile(String filename) throws IOException {
122 super(filename);
123 }
124
125 }