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 public BufferedFile(File file, String mode, int bufferSize) throws IOException { 57 super(file, mode, bufferSize); 58 } 59 60 /** 61 * Constructs a buffered FITS file with the default buffer size. 62 * 63 * @param file the underlying file 64 * @param mode the access mode as a string, e.g. "rw" 65 * 66 * @throws IOException if there was an error opening the file 67 */ 68 public BufferedFile(File file, String mode) throws IOException { 69 super(file, mode); 70 } 71 72 /** 73 * Constructs a buffered FITS file with the default buffer size and default access mode. 74 * 75 * @param file the underlying file 76 * 77 * @throws IOException if there was an error opening the file 78 */ 79 public BufferedFile(File file) throws IOException { 80 super(file); 81 } 82 83 /** 84 * Constructs a buffered FITS file 85 * 86 * @param filename the file name / path 87 * @param mode the access mode as a string, e.g. "rw" 88 * @param bufferSize the buffer size in bytes 89 * 90 * @throws IOException if there was an error opening the file 91 */ 92 public BufferedFile(String filename, String mode, int bufferSize) throws IOException { 93 super(filename, mode, bufferSize); 94 } 95 96 /** 97 * Constructs a buffered FITS file with the default buffer size 98 * 99 * @param filename the file name / path 100 * @param mode the access mode as a string, e.g. "rw" 101 * 102 * @throws IOException if there was an error opening the file 103 */ 104 public BufferedFile(String filename, String mode) throws IOException { 105 super(filename, mode); 106 } 107 108 /** 109 * Constructs a buffered FITS file with the default buffer size and default access mode 110 * 111 * @param filename the file name / path 112 * 113 * @throws IOException if there was an error opening the file 114 */ 115 public BufferedFile(String filename) throws IOException { 116 super(filename); 117 } 118 119 }