Mercurial Hosting > luan
comparison src/org/eclipse/jetty/io/View.java @ 1030:80cad9086593
remove Buffer.isVolatile()
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Thu, 03 Nov 2016 01:10:09 -0600 |
parents | 4e5e9e3c25b3 |
children | 921c25a05eaa |
comparison
equal
deleted
inserted
replaced
1029:4e5e9e3c25b3 | 1030:80cad9086593 |
---|---|
36 * @param put The initial value of the {@link Buffer#putIndex put index} | 36 * @param put The initial value of the {@link Buffer#putIndex put index} |
37 * @param access The access level - one of the constants from {@link Buffer}. | 37 * @param access The access level - one of the constants from {@link Buffer}. |
38 */ | 38 */ |
39 public View(Buffer buffer, int mark, int get, int put,int access) | 39 public View(Buffer buffer, int mark, int get, int put,int access) |
40 { | 40 { |
41 super(READWRITE,!buffer.isImmutable()); | 41 super(READWRITE); |
42 _buffer=buffer.buffer(); | 42 _buffer=buffer.buffer(); |
43 setPutIndex(put); | 43 setPutIndex(put); |
44 setGetIndex(get); | 44 setGetIndex(get); |
45 setMarkIndex(mark); | 45 setMarkIndex(mark); |
46 _access=access; | 46 _access=access; |
47 } | 47 } |
48 | 48 |
49 public View(Buffer buffer) | 49 public View(Buffer buffer) |
50 { | 50 { |
51 super(READWRITE,!buffer.isImmutable()); | 51 super(READWRITE); |
52 _buffer=buffer.buffer(); | 52 _buffer=buffer.buffer(); |
53 setPutIndex(buffer.putIndex()); | 53 setPutIndex(buffer.putIndex()); |
54 setGetIndex(buffer.getIndex()); | 54 setGetIndex(buffer.getIndex()); |
55 setMarkIndex(buffer.markIndex()); | 55 setMarkIndex(buffer.markIndex()); |
56 _access=buffer.isReadOnly()?READONLY:READWRITE; | 56 _access=buffer.isReadOnly()?READONLY:READWRITE; |
57 } | 57 } |
58 | 58 |
59 public View() | 59 public View() |
60 { | 60 { |
61 super(READWRITE,true); | 61 super(READWRITE); |
62 } | 62 } |
63 | 63 |
64 /** | 64 /** |
65 * Update view to buffer | 65 * Update view to buffer |
66 */ | 66 */ |
124 { | 124 { |
125 return _buffer.isReadOnly(); | 125 return _buffer.isReadOnly(); |
126 } | 126 } |
127 | 127 |
128 @Override | 128 @Override |
129 public boolean isVolatile() | |
130 { | |
131 return true; | |
132 } | |
133 | |
134 @Override | |
135 public byte peek(int index) | 129 public byte peek(int index) |
136 { | 130 { |
137 return _buffer.peek(index); | 131 return _buffer.peek(index); |
138 } | 132 } |
139 | 133 |