View Javadoc
1   package nom.tam.util;
2   
3   import java.io.IOException;
4   
5   /*
6    * #%L
7    * nom.tam FITS library
8    * %%
9    * Copyright (C) 1996 - 2024 nom-tam-fits
10   * %%
11   * This is free and unencumbered software released into the public domain.
12   *
13   * Anyone is free to copy, modify, publish, use, compile, sell, or
14   * distribute this software, either in source code form or as a compiled
15   * binary, for any purpose, commercial or non-commercial, and by any
16   * means.
17   *
18   * In jurisdictions that recognize copyright laws, the author or authors
19   * of this software dedicate any and all copyright interest in the
20   * software to the public domain. We make this dedication for the benefit
21   * of the public at large and to the detriment of our heirs and
22   * successors. We intend this dedication to be an overt act of
23   * relinquishment in perpetuity of all present and future rights to this
24   * software under copyright law.
25   *
26   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
27   * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
28   * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
29   * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
30   * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
31   * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
32   * OTHER DEALINGS IN THE SOFTWARE.
33   * #L%
34   */
35  
36  import java.io.OutputStream;
37  
38  /**
39   * @deprecated Use {@link FitsOutputStream}, which provides the exact same functionality but with a less misleading
40   *                 name, or else use {@link ArrayOutputStream} as a base for an implementation with any (non-FITS)
41   *                 encoding.
42   */
43  @Deprecated
44  public class BufferedDataOutputStream extends FitsOutputStream {
45  
46      /**
47       * Instantiates a new output stream for FITS data.
48       *
49       * @param o         the underlying output stream
50       * @param bufLength the size of the buffer to use in bytes.
51       */
52      public BufferedDataOutputStream(OutputStream o, int bufLength) {
53          super(o, bufLength);
54      }
55  
56      /**
57       * Instantiates a new output stream for FITS data, using a default buffer size.
58       *
59       * @param o the underlying output stream
60       */
61      public BufferedDataOutputStream(OutputStream o) {
62          super(o);
63      }
64  
65      /**
66       * @deprecated             No longer used internally, but kept for back compatibility (and it does exactly nothing)
67       *
68       * @param      need        the number of consecutive bytes we need in the buffer for the next write.
69       *
70       * @throws     IOException if there was an IO error flushing the buffer to the output to make avaiable the space
71       *                             required in the buffer.
72       */
73      @Deprecated
74      protected void checkBuf(int need) throws IOException {
75      }
76  
77  }