Skip to content

Commit 24c0e9a

Browse files
committed
Removed unused code
1 parent b6b9977 commit 24c0e9a

File tree

9 files changed

+0
-442
lines changed

9 files changed

+0
-442
lines changed

src/android/org/eclipse/jetty/io/BufferCache.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,6 @@ public CachedBuffer get(Buffer buffer)
5757
return (CachedBuffer)_bufferMap.get(buffer);
5858
}
5959

60-
public CachedBuffer get(String value)
61-
{
62-
return (CachedBuffer)_stringMap.get(value);
63-
}
64-
6560
public Buffer lookup(Buffer buffer)
6661
{
6762
if (buffer instanceof CachedBuffer)

src/android/org/eclipse/jetty/io/nio/ChannelEndPoint.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,6 @@ public boolean isBlocking()
7575
return !(_channel instanceof SelectableChannel) || ((SelectableChannel)_channel).isBlocking();
7676
}
7777

78-
public boolean blockReadable(long millisecs) throws IOException
79-
{
80-
return true;
81-
}
82-
8378
public boolean blockWritable(long millisecs) throws IOException
8479
{
8580
return true;

src/android/org/eclipse/jetty/io/nio/SelectChannelEndPoint.java

Lines changed: 0 additions & 96 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
import org.eclipse.jetty.io.nio.SelectorManager.SelectSet;
3535
import org.eclipse.jetty.util.log.Log;
3636
import org.eclipse.jetty.util.log.Logger;
37-
import org.eclipse.jetty.util.thread.Timeout.Task;
3837

3938
/* ------------------------------------------------------------ */
4039
/**
@@ -183,26 +182,6 @@ public void schedule()
183182
}
184183
}
185184

186-
/* ------------------------------------------------------------ */
187-
public void asyncDispatch()
188-
{
189-
synchronized(this)
190-
{
191-
switch(_state)
192-
{
193-
case STATE_NEEDS_DISPATCH:
194-
case STATE_UNDISPATCHED:
195-
dispatch();
196-
break;
197-
198-
case STATE_DISPATCHED:
199-
case STATE_ASYNC:
200-
_state=STATE_ASYNC;
201-
break;
202-
}
203-
}
204-
}
205-
206185
/* ------------------------------------------------------------ */
207186
public void dispatch()
208187
{
@@ -252,18 +231,6 @@ protected boolean undispatch()
252231
}
253232
}
254233

255-
/* ------------------------------------------------------------ */
256-
public void cancelTimeout(Task task)
257-
{
258-
getSelectSet().cancelTimeout(task);
259-
}
260-
261-
/* ------------------------------------------------------------ */
262-
public void scheduleTimeout(Task task, long timeoutMs)
263-
{
264-
getSelectSet().scheduleTimeout(task,timeoutMs);
265-
}
266-
267234
/* ------------------------------------------------------------ */
268235
public void setCheckForIdle(boolean check)
269236
{
@@ -377,57 +344,6 @@ else if (l>0)
377344
return l;
378345
}
379346

380-
/* ------------------------------------------------------------ */
381-
/*
382-
* Allows thread to block waiting for further events.
383-
*/
384-
@SuppressWarnings("serial")
385-
@Override
386-
public boolean blockReadable(long timeoutMs) throws IOException
387-
{
388-
synchronized (this)
389-
{
390-
if (isInputShutdown())
391-
throw new EofException();
392-
393-
long now=_selectSet.getNow();
394-
long end=now+timeoutMs;
395-
boolean check=isCheckForIdle();
396-
setCheckForIdle(true);
397-
try
398-
{
399-
_readBlocked=true;
400-
while (!isInputShutdown() && _readBlocked)
401-
{
402-
try
403-
{
404-
updateKey();
405-
this.wait(timeoutMs>0?(end-now):10000);
406-
}
407-
catch (final InterruptedException e)
408-
{
409-
LOG.warn(e);
410-
if (_interruptable)
411-
throw new InterruptedIOException(){{this.initCause(e);}};
412-
}
413-
finally
414-
{
415-
now=_selectSet.getNow();
416-
}
417-
418-
if (_readBlocked && timeoutMs>0 && now>=end)
419-
return false;
420-
}
421-
}
422-
finally
423-
{
424-
_readBlocked=false;
425-
setCheckForIdle(check);
426-
}
427-
}
428-
return true;
429-
}
430-
431347
/* ------------------------------------------------------------ */
432348
/*
433349
* Allows thread to block waiting for further events.
@@ -491,12 +407,6 @@ public void scheduleWrite()
491407
updateKey();
492408
}
493409

494-
/* ------------------------------------------------------------ */
495-
public boolean isWritable()
496-
{
497-
return _writable;
498-
}
499-
500410
/* ------------------------------------------------------------ */
501411
public boolean hasProgressed()
502412
{
@@ -783,12 +693,6 @@ public String toString()
783693
_connection);
784694
}
785695

786-
/* ------------------------------------------------------------ */
787-
public SelectSet getSelectSet()
788-
{
789-
return _selectSet;
790-
}
791-
792696
/* ------------------------------------------------------------ */
793697
/**
794698
* Don't set the SoTimeout

src/android/org/eclipse/jetty/io/nio/SelectorManager.java

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -664,26 +664,6 @@ public long getNow()
664664
return _timeout.getNow();
665665
}
666666

667-
/* ------------------------------------------------------------ */
668-
/**
669-
* @param task The task to timeout. If it implements Runnable, then
670-
* expired will be called from a dispatched thread.
671-
*
672-
* @param timeoutMs
673-
*/
674-
public void scheduleTimeout(Timeout.Task task, long timeoutMs)
675-
{
676-
if (!(task instanceof Runnable))
677-
throw new IllegalArgumentException("!Runnable");
678-
_timeout.schedule(task, timeoutMs);
679-
}
680-
681-
/* ------------------------------------------------------------ */
682-
public void cancelTimeout(Timeout.Task task)
683-
{
684-
task.cancel();
685-
}
686-
687667
/* ------------------------------------------------------------ */
688668
public void wakeup()
689669
{

src/android/org/eclipse/jetty/util/QuotedStringTokenizer.java

Lines changed: 0 additions & 188 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@
2020

2121
import java.io.IOException;
2222
import java.util.Arrays;
23-
import java.util.NoSuchElementException;
24-
import java.util.StringTokenizer;
2523

2624
/* ------------------------------------------------------------ */
2725
/** StringTokenizer with Quoting support.
@@ -36,193 +34,7 @@
3634
*
3735
*/
3836
public class QuotedStringTokenizer
39-
extends StringTokenizer
4037
{
41-
private final static String __delim="\t\n\r";
42-
private String _string;
43-
private String _delim = __delim;
44-
private boolean _returnQuotes=false;
45-
private boolean _returnDelimiters=false;
46-
private StringBuffer _token;
47-
private boolean _hasToken=false;
48-
private int _i=0;
49-
private boolean _double=true;
50-
private boolean _single=true;
51-
52-
/* ------------------------------------------------------------ */
53-
public QuotedStringTokenizer(String str,
54-
String delim,
55-
boolean returnDelimiters,
56-
boolean returnQuotes)
57-
{
58-
super("");
59-
_string=str;
60-
if (delim!=null)
61-
_delim=delim;
62-
_returnDelimiters=returnDelimiters;
63-
_returnQuotes=returnQuotes;
64-
65-
if (_delim.indexOf('\'')>=0 ||
66-
_delim.indexOf('"')>=0)
67-
throw new Error("Can't use quotes as delimiters: "+_delim);
68-
69-
_token=new StringBuffer(_string.length()>1024?512:_string.length()/2);
70-
}
71-
72-
/* ------------------------------------------------------------ */
73-
@Override
74-
public boolean hasMoreTokens()
75-
{
76-
// Already found a token
77-
if (_hasToken)
78-
return true;
79-
80-
int state=0;
81-
boolean escape=false;
82-
while (_i<_string.length())
83-
{
84-
char c=_string.charAt(_i++);
85-
86-
switch (state)
87-
{
88-
case 0: // Start
89-
if(_delim.indexOf(c)>=0)
90-
{
91-
if (_returnDelimiters)
92-
{
93-
_token.append(c);
94-
return _hasToken=true;
95-
}
96-
}
97-
else if (c=='\'' && _single)
98-
{
99-
if (_returnQuotes)
100-
_token.append(c);
101-
state=2;
102-
}
103-
else if (c=='\"' && _double)
104-
{
105-
if (_returnQuotes)
106-
_token.append(c);
107-
state=3;
108-
}
109-
else
110-
{
111-
_token.append(c);
112-
_hasToken=true;
113-
state=1;
114-
}
115-
break;
116-
117-
case 1: // Token
118-
_hasToken=true;
119-
if(_delim.indexOf(c)>=0)
120-
{
121-
if (_returnDelimiters)
122-
_i--;
123-
return _hasToken;
124-
}
125-
else if (c=='\'' && _single)
126-
{
127-
if (_returnQuotes)
128-
_token.append(c);
129-
state=2;
130-
}
131-
else if (c=='\"' && _double)
132-
{
133-
if (_returnQuotes)
134-
_token.append(c);
135-
state=3;
136-
}
137-
else
138-
{
139-
_token.append(c);
140-
}
141-
break;
142-
143-
case 2: // Single Quote
144-
_hasToken=true;
145-
if (escape)
146-
{
147-
escape=false;
148-
_token.append(c);
149-
}
150-
else if (c=='\'')
151-
{
152-
if (_returnQuotes)
153-
_token.append(c);
154-
state=1;
155-
}
156-
else if (c=='\\')
157-
{
158-
if (_returnQuotes)
159-
_token.append(c);
160-
escape=true;
161-
}
162-
else
163-
{
164-
_token.append(c);
165-
}
166-
break;
167-
168-
case 3: // Double Quote
169-
_hasToken=true;
170-
if (escape)
171-
{
172-
escape=false;
173-
_token.append(c);
174-
}
175-
else if (c=='\"')
176-
{
177-
if (_returnQuotes)
178-
_token.append(c);
179-
state=1;
180-
}
181-
else if (c=='\\')
182-
{
183-
if (_returnQuotes)
184-
_token.append(c);
185-
escape=true;
186-
}
187-
else
188-
{
189-
_token.append(c);
190-
}
191-
break;
192-
}
193-
}
194-
195-
return _hasToken;
196-
}
197-
198-
/* ------------------------------------------------------------ */
199-
@Override
200-
public String nextToken()
201-
throws NoSuchElementException
202-
{
203-
if (!hasMoreTokens() || _token==null)
204-
throw new NoSuchElementException();
205-
String t=_token.toString();
206-
_token.setLength(0);
207-
_hasToken=false;
208-
return t;
209-
}
210-
211-
/* ------------------------------------------------------------ */
212-
@Override
213-
public boolean hasMoreElements()
214-
{
215-
return hasMoreTokens();
216-
}
217-
218-
/* ------------------------------------------------------------ */
219-
@Override
220-
public Object nextElement()
221-
throws NoSuchElementException
222-
{
223-
return nextToken();
224-
}
225-
22638
/* ------------------------------------------------------------ */
22739
/** Quote a string.
22840
* The string is quoted only if quoting is required due to

0 commit comments

Comments
 (0)