/[classpath]/classpath/java/nio/MappedByteBufferImpl.java
ViewVC logotype

Diff of /classpath/java/nio/MappedByteBufferImpl.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.4 by mkoch, Mon Jul 14 05:56:27 2003 UTC revision 1.5 by mkoch, Thu Sep 25 14:01:18 2003 UTC
# Line 58  public class MappedByteBufferImpl extend Line 58  public class MappedByteBufferImpl extend
58      limit ((int) si);      limit ((int) si);
59    }    }
60    
61      public MappedByteBufferImpl (FileChannelImpl ch, int offset, int capacity, int limit, int position, int mark, boolean readOnly)
62      {
63        super (capacity, limit, position, mark);
64    
65        this.ch = ch;
66        this.array_offset = offset;
67        this.readOnly = readOnly;
68      }
69      
70    public boolean isReadOnly ()    public boolean isReadOnly ()
71    {    {
72      return readOnly;      return readOnly;
# Line 102  public class MappedByteBufferImpl extend Line 111  public class MappedByteBufferImpl extend
111    
112    public ByteBuffer compact ()    public ByteBuffer compact ()
113    {    {
114      throw new Error ("Not implemented");      int copied = 0;
115        
116        while (remaining () > 0)
117          {
118            put (copied, get ());
119            copied++;
120          }
121    
122        position (copied);
123        return this;
124    }    }
125    
126    public boolean isDirect ()    public boolean isDirect ()
# Line 155  public class MappedByteBufferImpl extend Line 173  public class MappedByteBufferImpl extend
173      return new DoubleViewBufferImpl (this, position (), remaining(), remaining (), 0, -1, isReadOnly ());      return new DoubleViewBufferImpl (this, position (), remaining(), remaining (), 0, -1, isReadOnly ());
174    }    }
175    
176    public char getChar ()    public final char getChar()
177    {    {
178      throw new Error ("Not implemented");      return ByteBufferHelper.getChar (this);
179    }    }
180      
181    public char getChar (int index)    public final ByteBuffer putChar (char value)
182    {    {
183      throw new Error ("Not implemented");      return ByteBufferHelper.putChar (this, value);
184    }    }
185      
186    public ByteBuffer putChar (char value)    public final char getChar (int index)
187    {    {
188      throw new Error ("Not implemented");      return ByteBufferHelper.getChar (this, index);
189    }    }
190      
191    public ByteBuffer putChar (int index, char value)    public final ByteBuffer putChar (int index, char value)
192    {    {
193      throw new Error ("Not implemented");      return ByteBufferHelper.putChar (this, index, value);
194    }    }
195    
196    public double getDouble ()    public final short getShort()
197    {    {
198      throw new Error ("Not implemented");      return ByteBufferHelper.getShort (this);
199    }    }
200      
201    public double getDouble (int index)    public final ByteBuffer putShort (short value)
202    {    {
203      throw new Error ("Not implemented");      return ByteBufferHelper.putShort (this, value);
204    }    }
205      
206    public ByteBuffer putDouble (double value)    public final short getShort (int index)
207    {    {
208      throw new Error ("Not implemented");      return ByteBufferHelper.getShort (this, index);
209    }    }
210      
211    public ByteBuffer putDouble (int index, double value)    public final ByteBuffer putShort (int index, short value)
212    {    {
213      throw new Error ("Not implemented");      return ByteBufferHelper.putShort (this, index, value);
214    }    }
215    
216    public float getFloat ()    public final int getInt()
217    {    {
218      throw new Error ("Not implemented");      return ByteBufferHelper.getInt (this);
219    }    }
220      
221    public float getFloat (int index)    public final ByteBuffer putInt (int value)
222    {    {
223      throw new Error ("Not implemented");      return ByteBufferHelper.putInt (this, value);
224    }    }
225      
226    public ByteBuffer putFloat (float value)    public final int getInt (int index)
227    {    {
228      throw new Error ("Not implemented");      return ByteBufferHelper.getInt (this, index);
229    }    }
230      
231    public ByteBuffer putFloat (int index, float value)    public final ByteBuffer putInt (int index, int value)
232    {    {
233      throw new Error ("Not implemented");      return ByteBufferHelper.putInt (this, index, value);
234    }    }
235    
236    public int getInt ()    public final long getLong()
237    {    {
238      throw new Error ("Not implemented");      return ByteBufferHelper.getLong (this);
239    }    }
240      
241    public int getInt (int index)    public final ByteBuffer putLong (long value)
242    {    {
243      throw new Error ("Not implemented");      return ByteBufferHelper.putLong (this, value);
244    }    }
245      
246    public ByteBuffer putInt (int value)    public final long getLong (int index)
247    {    {
248      throw new Error ("Not implemented");      return ByteBufferHelper.getLong (this, index);
249    }    }
250      
251    public ByteBuffer putInt (int index, int value)    public final ByteBuffer putLong (int index, long value)
252    {    {
253      throw new Error ("Not implemented");      return ByteBufferHelper.putLong (this, index, value);
254    }    }
255    
256    public long getLong ()    public final float getFloat()
257    {    {
258      throw new Error ("Not implemented");      return ByteBufferHelper.getFloat (this);
259    }    }
260      
261    public long getLong (int index)    public final ByteBuffer putFloat (float value)
262    {    {
263      throw new Error ("Not implemented");      return ByteBufferHelper.putFloat (this, value);
264    }    }
265      
266    public ByteBuffer putLong (long value)    public final float getFloat (int index)
267    {    {
268      throw new Error ("Not implemented");      return ByteBufferHelper.getFloat (this, index);
269    }    }
270    
271    public ByteBuffer putLong (int index, long value)    public final ByteBuffer putFloat (int index, float value)
272    {    {
273      throw new Error ("Not implemented");      return ByteBufferHelper.putFloat (this, index, value);
274    }    }
275    
276    public short getShort ()    public final double getDouble()
277    {    {
278      throw new Error ("Not implemented");      return ByteBufferHelper.getDouble (this);
279    }    }
280    
281    public short getShort (int index)    public final ByteBuffer putDouble (double value)
282    {    {
283      throw new Error ("Not implemented");      return ByteBufferHelper.putDouble (this, value);
284    }    }
285      
286    public ByteBuffer putShort (short value)    public final double getDouble (int index)
287    {    {
288      throw new Error ("Not implemented");      return ByteBufferHelper.getDouble (this, index);
289    }    }
290      
291    public ByteBuffer putShort (int index, short value)    public final ByteBuffer putDouble (int index, double value)
292    {    {
293      throw new Error ("Not implemented");      return ByteBufferHelper.putDouble (this, index, value);
294    }    }
295  }  }

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26