KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > sapia > ubik > net > mplex > PositiveStreamSelector


1 package org.sapia.ubik.net.mplex;
2
3
4 /**
5  * This is an implementation of a selector that always return true.
6  *
7  * @author <a HREF="mailto:jc@sapia-oss.org">Jean-Cedric Desrochers</a>
8  * <dl>
9  * <dt><b>Copyright:</b><dd>Copyright &#169; 2002-2004 <a HREF="http://www.sapia-oss.org">
10  * Sapia Open Source Software</a>. All Rights Reserved.</dd></dt>
11  * <dt><b>License:</b><dd>Read the license.txt file of the jar or visit the
12  * <a HREF="http://www.sapia-oss.org/license.html" target="sapia-license">license page</a>
13  * at the Sapia OSS web site</dd></dt>
14  * </dl>
15  */

16 public class PositiveStreamSelector implements StreamSelector {
17   /**
18    * Creates a new PositiveStreamSelector instance.
19    */

20   public PositiveStreamSelector() {
21   }
22
23   /**
24    * Selects or not a stream by analyzing the header of the stream passed in.
25    *
26    * @param header The first 64 bytes of the stream.
27    * @return True if the header is accepted by this selector, false otherwise.
28    */

29   public boolean selectStream(byte[] header) {
30     return true;
31   }
32 }
33
Popular Tags