diff options
Diffstat (limited to 'songdbj/org/tritonus/share/sampled/file/TNonSeekableDataOutputStream.java')
-rw-r--r-- | songdbj/org/tritonus/share/sampled/file/TNonSeekableDataOutputStream.java | 109 |
1 files changed, 0 insertions, 109 deletions
diff --git a/songdbj/org/tritonus/share/sampled/file/TNonSeekableDataOutputStream.java b/songdbj/org/tritonus/share/sampled/file/TNonSeekableDataOutputStream.java deleted file mode 100644 index 2e9704ed10..0000000000 --- a/songdbj/org/tritonus/share/sampled/file/TNonSeekableDataOutputStream.java +++ /dev/null | |||
@@ -1,109 +0,0 @@ | |||
1 | /* | ||
2 | * TNonSeekableDataOutputStream.java | ||
3 | * | ||
4 | * This file is part of Tritonus: http://www.tritonus.org/ | ||
5 | */ | ||
6 | |||
7 | /* | ||
8 | * Copyright (c) 1999 by Florian Bomers <http://www.bomers.de> | ||
9 | * Copyright (c) 2000 by Matthias Pfisterer | ||
10 | * | ||
11 | * | ||
12 | * This program is free software; you can redistribute it and/or modify | ||
13 | * it under the terms of the GNU Library General Public License as published | ||
14 | * by the Free Software Foundation; either version 2 of the License, or | ||
15 | * (at your option) any later version. | ||
16 | * | ||
17 | * This program is distributed in the hope that it will be useful, | ||
18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
20 | * GNU Library General Public License for more details. | ||
21 | * | ||
22 | * You should have received a copy of the GNU Library General Public | ||
23 | * License along with this program; if not, write to the Free Software | ||
24 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
25 | * | ||
26 | */ | ||
27 | |||
28 | /* | ||
29 | |<--- this code is formatted to fit into 80 columns --->| | ||
30 | */ | ||
31 | |||
32 | package org.tritonus.share.sampled.file; | ||
33 | |||
34 | import java.io.IOException; | ||
35 | import java.io.OutputStream; | ||
36 | import java.io.DataOutputStream; | ||
37 | |||
38 | |||
39 | |||
40 | /** | ||
41 | * A TDataOutputStream that does not allow seeking. | ||
42 | * | ||
43 | * @author Florian Bomers | ||
44 | * @author Matthias Pfisterer | ||
45 | */ | ||
46 | public class TNonSeekableDataOutputStream | ||
47 | extends DataOutputStream | ||
48 | implements TDataOutputStream | ||
49 | { | ||
50 | public TNonSeekableDataOutputStream(OutputStream outputStream) | ||
51 | { | ||
52 | super(outputStream); | ||
53 | } | ||
54 | |||
55 | |||
56 | |||
57 | public boolean supportsSeek() | ||
58 | { | ||
59 | return false; | ||
60 | } | ||
61 | |||
62 | |||
63 | |||
64 | public void seek(long position) | ||
65 | throws IOException | ||
66 | { | ||
67 | throw new IllegalArgumentException("TNonSeekableDataOutputStream: Call to seek not allowed."); | ||
68 | } | ||
69 | |||
70 | |||
71 | |||
72 | public long getFilePointer() | ||
73 | throws IOException | ||
74 | { | ||
75 | throw new IllegalArgumentException("TNonSeekableDataOutputStream: Call to getFilePointer not allowed."); | ||
76 | } | ||
77 | |||
78 | |||
79 | |||
80 | public long length() | ||
81 | throws IOException | ||
82 | { | ||
83 | throw new IllegalArgumentException("TNonSeekableDataOutputStream: Call to length not allowed."); | ||
84 | } | ||
85 | |||
86 | |||
87 | |||
88 | public void writeLittleEndian32(int value) | ||
89 | throws IOException | ||
90 | { | ||
91 | writeByte(value & 0xFF); | ||
92 | writeByte((value >> 8) & 0xFF); | ||
93 | writeByte((value >> 16) & 0xFF); | ||
94 | writeByte((value >> 24) & 0xFF); | ||
95 | } | ||
96 | |||
97 | |||
98 | |||
99 | public void writeLittleEndian16(short value) | ||
100 | throws IOException | ||
101 | { | ||
102 | writeByte(value & 0xFF); | ||
103 | writeByte((value >> 8) & 0xFF); | ||
104 | } | ||
105 | } | ||
106 | |||
107 | |||
108 | |||
109 | /*** TNonSeekableDataOutputStream.java ***/ | ||