@Override public boolean containsValue(Object value) { if (value instanceof String) { MessageBytes needle = MessageBytes.newInstance(); needle.setString((String) value); for (int i = 0; i < this.headers.size(); i++) { if (this.headers.getValue(i).equals(needle)) { return true; } } } return false; }
@Override public boolean containsValue(Object value) { if (value instanceof String) { MessageBytes needle = MessageBytes.newInstance(); needle.setString((String) value); for (int i = 0; i < this.headers.size(); i++) { if (this.headers.getValue(i).equals(needle)) { return true; } } } return false; }
protected int findFirst(String name) { for (int i = 0; i < count; i++) { if (fields[i].name.equals(name)) { return i; } } return -1; }
@Override public boolean equals(Object obj) { if (obj instanceof MessageBytes) { return equals((MessageBytes) obj); } return false; }
@Override public boolean equals(Object obj) { if (obj instanceof MessageBytes) { return equals((MessageBytes) obj); } return false; }
@Override public boolean equals(Object obj) { if (obj instanceof MessageBytes) { return equals((MessageBytes) obj); } return false; }
@Override public boolean equals(Object obj) { if (obj instanceof MessageBytes) { return equals((MessageBytes) obj); } return false; }
public MessageBytes get( String name) { for (int i = 0; i < count; i++) { if (fields[i].name.equals(name)) { return fields[i].value; } } return null; }
public int findFirst( String name ) { for (int i = 0; i < count; i++) { if (fields[i].name.equals(name)) { return i; } } return -1; }
@Override public boolean equals(Object obj) { if (obj instanceof MessageBytes) { return equals((MessageBytes) obj); } return false; }
/** Find the index of a field with the given name. */ public int find( String name, int starting ) { // We can use a hash - but it's not clear how much // benefit you can get - there is an overhead // and the number of headers is small (4-5 ?) // Another problem is that we'll pay the overhead // of constructing the hashtable // A custom search tree may be better for (int i = starting; i < count; i++) { if (fields[i].name.equals(name)) { return i; } } return -1; }
private boolean isConnectionClose(MimeHeaders headers) { MessageBytes connection = headers.getValue(Constants.CONNECTION); if (connection == null) { return false; } return connection.equals(Constants.CLOSE); }
private boolean isConnectionClose(MimeHeaders headers) { MessageBytes connection = headers.getValue(Constants.CONNECTION); if (connection == null) { return false; } return connection.equals(Constants.CLOSE); }
private boolean isConnectionClose(MimeHeaders headers) { MessageBytes connection = headers.getValue(Constants.CONNECTION); if (connection == null) { return false; } return connection.equals(Constants.CLOSE); }
private static boolean isConnectionClose(MimeHeaders headers) { MessageBytes connection = headers.getValue(Constants.CONNECTION); if (connection == null) { return false; } return connection.equals(Constants.CLOSE); }
private boolean isConnectionClose(MimeHeaders headers) { MessageBytes connection = headers.getValue(Constants.CONNECTION); if (connection == null) { return false; } return connection.equals(Constants.CLOSE); }
private boolean isConnectionClose(MimeHeaders headers) { MessageBytes connection = headers.getValue(Constants.CONNECTION); if (connection == null) { return false; } return connection.equals(Constants.CLOSE); }
@Override public boolean containsValue(Object value) { if (value instanceof String) { MessageBytes needle = MessageBytes.newInstance(); needle.setString((String) value); for (int i = 0; i < this.headers.size(); i++) { if (this.headers.getValue(i).equals(needle)) { return true; } } } return false; }
@Override public boolean containsValue(Object value) { if (value instanceof String) { MessageBytes needle = MessageBytes.newInstance(); needle.setString((String) value); for (int i = 0; i < this.headers.size(); i++) { if (this.headers.getValue(i).equals(needle)) { return true; } } } return false; }