Java Code Examples for java.io.DataInputStream#readFully()

The following examples show how to use java.io.DataInputStream#readFully() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: HoodieLogBlock.java    From hudi with Apache License 2.0 6 votes vote down vote up
/**
 * Convert bytes to LogMetadata, follow the same order as {@link HoodieLogBlock#getLogMetadataBytes}.
 */
public static Map<HeaderMetadataType, String> getLogMetadata(DataInputStream dis) throws IOException {

  Map<HeaderMetadataType, String> metadata = new HashMap<>();
  // 1. Read the metadata written out
  int metadataCount = dis.readInt();
  try {
    while (metadataCount > 0) {
      int metadataEntryIndex = dis.readInt();
      int metadataEntrySize = dis.readInt();
      byte[] metadataEntry = new byte[metadataEntrySize];
      dis.readFully(metadataEntry, 0, metadataEntrySize);
      metadata.put(HeaderMetadataType.values()[metadataEntryIndex], new String(metadataEntry));
      metadataCount--;
    }
    return metadata;
  } catch (EOFException eof) {
    throw new IOException("Could not read metadata fields ", eof);
  }
}
 
Example 2
Source File: ModelByteBuffer.java    From jdk8u_jdk with GNU General Public License v2.0 6 votes vote down vote up
public void load() throws IOException {
    if (root != this) {
        root.load();
        return;
    }
    if (buffer != null)
        return;
    if (file == null) {
        throw new IllegalStateException(
                "No file associated with this ByteBuffer!");
    }

    DataInputStream is = new DataInputStream(getInputStream());
    buffer = new byte[(int) capacity()];
    offset = 0;
    is.readFully(buffer);
    is.close();

}
 
Example 3
Source File: BinaryAttribute.java    From jdk8u-dev-jdk with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Load a list of attributes
 */
public static BinaryAttribute load(DataInputStream in, BinaryConstantPool cpool, int mask) throws IOException {
    BinaryAttribute atts = null;
    int natt = in.readUnsignedShort();  // JVM 4.6 method_info.attrutes_count

    for (int i = 0 ; i < natt ; i++) {
        // id from JVM 4.7 attribute_info.attribute_name_index
        Identifier id = cpool.getIdentifier(in.readUnsignedShort());
        // id from JVM 4.7 attribute_info.attribute_length
        int len = in.readInt();

        if (id.equals(idCode) && ((mask & ATT_CODE) == 0)) {
            in.skipBytes(len);
        } else {
            byte data[] = new byte[len];
            in.readFully(data);
            atts = new BinaryAttribute(id, data, atts);
        }
    }
    return atts;
}
 
Example 4
Source File: DocImpl.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Utility for subclasses which read HTML documentation files.
 */
String readHTMLDocumentation(InputStream input, FileObject filename) throws IOException {
    byte[] filecontents = new byte[input.available()];
    try {
        DataInputStream dataIn = new DataInputStream(input);
        dataIn.readFully(filecontents);
    } finally {
        input.close();
    }
    String encoding = env.getEncoding();
    String rawDoc = (encoding!=null)
        ? new String(filecontents, encoding)
        : new String(filecontents);
    Pattern bodyPat = Pattern.compile("(?is).*<body\\b[^>]*>(.*)</body\\b.*");
    Matcher m = bodyPat.matcher(rawDoc);
    if (m.matches()) {
        return m.group(1);
    } else {
        String key = rawDoc.matches("(?is).*<body\\b.*")
                ? "javadoc.End_body_missing_from_html_file"
                : "javadoc.Body_missing_from_html_file";
        env.error(SourcePositionImpl.make(filename, Position.NOPOS, null), key);
        return "";
    }
}
 
Example 5
Source File: DivSufSortTest.java    From succinct with Apache License 2.0 6 votes vote down vote up
/**
 * Set up test.
 *
 * @throws Exception
 */
public void setUp() throws Exception {
  super.setUp();
  instance = new DivSufSort();
  File inputFile = new File(testFileRaw);

  byte[] fileData = new byte[(int) inputFile.length()];

  DataInputStream dis = new DataInputStream(new FileInputStream(inputFile));
  dis.readFully(fileData);

  ByteArrayOutputStream out = new ByteArrayOutputStream(fileData.length + 1);
  out.write(fileData);
  out.write(0);
  data = out.toByteArray();
}
 
Example 6
Source File: SuProcessFileInputStream.java    From libsu with Apache License 2.0 6 votes vote down vote up
/**
 * @see FileInputStream#FileInputStream(File)
 */
public SuProcessFileInputStream(File file) throws FileNotFoundException {
    super(null);
    try {
        process = Runtime.getRuntime().exec(new String[]{"su", "-c",
                String.format("[ -e '%s' ] && echo 1 && cat '%s' || echo 0", file, file)});
        in = process.getInputStream();
        byte[] buf = new byte[2];
        DataInputStream dis = new DataInputStream(in);
        dis.readFully(buf);
        if (buf[0] == '0') {
            close();
            throw new FileNotFoundException("No such file or directory");
        }
    } catch (IOException e) {
        if (e instanceof FileNotFoundException)
            throw (FileNotFoundException) e;
        throw (FileNotFoundException)
                new FileNotFoundException("Error starting process").initCause(e);
    }
}
 
Example 7
Source File: XDRInput.java    From jpmml-r with GNU Affero General Public License v3.0 6 votes vote down vote up
public XDRInput(InputStream is) throws IOException {
	DataInputStream dis = new DataInputStream(is);

	byte first = dis.readByte();
	if(first != 'X'){
		throw new IllegalArgumentException();
	}

	byte second = dis.readByte();
	if(second != '\n'){
		byte[] xdrMagic = new byte[5];
		xdrMagic[0] = first;
		xdrMagic[1] = second;

		dis.readFully(xdrMagic, 2, xdrMagic.length - 2);

		if(!Arrays.equals(XDR2_MAGIC, xdrMagic)){
			throw new IllegalArgumentException();
		}
	}

	this.dis = dis;
}
 
Example 8
Source File: FishRestoreMain.java    From antsdb with GNU Lesser General Public License v3.0 5 votes vote down vote up
@SuppressWarnings("unused")
private void run(InputStream in) throws IOException {
    ByteBuffer buffer = ByteBuffer.allocate(1024);
    buffer.order(ByteOrder.LITTLE_ENDIAN);
    DataInputStream din = new DataInputStream(in);
    BackupFile backup = BackupFile.open(in);
    for (TableBackupInfo table:backup.tables) {
        String fullname = din.readUTF();
        System.out.print(fullname + ":");
        long nRows = 0;
        for (;;) {
            din.readFully(buffer.array(), 0, 4);
            int header = buffer.getInt(0);
            if (header == 0) {
                break;
            }
            if ((header & 0xff) != (Value.FORMAT_ROW & 0xff)) {
                String msg = String.format("invalid row found: %x @%x", header, 0);
                throw new IllegalArgumentException(msg);
            }
            din.readFully(buffer.array(), 4, 4);
            int size = buffer.getInt(4);
            if (size > buffer.capacity()) {
                buffer = ByteBuffer.allocate(size);
                buffer.order(ByteOrder.LITTLE_ENDIAN);
                buffer.putInt(header);
                buffer.putInt(size);
            }
            din.readFully(buffer.array(), 8, size-8);
            nRows++;
        }
        System.out.println(nRows + " rows");
    }
}
 
Example 9
Source File: ChatClient.java    From ChatRoom with MIT License 5 votes vote down vote up
public byte[] receiveMsg() throws IOException {
	DataInputStream dis = new DataInputStream(ins);
	int totalLen = dis.readInt();
	System.out.println("TotalLen"+totalLen);
	// ��ȡtotalLen���ȵ�����
	byte[] data = new byte[totalLen - 4];
	dis.readFully(data);
	return data;
}
 
Example 10
Source File: NetworkPacket.java    From sdn-wise-java with GNU General Public License v3.0 5 votes vote down vote up
/**
 * Returns a NetworkPacket given a DataInputStream. Integer values will be
 * truncated to byte.
 *
 * @param dis the DataInputStreamt
 */
public NetworkPacket(final DataInputStream dis) throws IOException {
    data = new byte[MAX_PACKET_LENGTH];
    byte[] tmpData = new byte[MAX_PACKET_LENGTH];
    int net = Byte.toUnsignedInt(dis.readByte());
    int len = Byte.toUnsignedInt(dis.readByte());
    if (len > 0) {
        tmpData[NET_INDEX] = (byte) net;
        tmpData[LEN_INDEX] = (byte) len;
        dis.readFully(tmpData, LEN_INDEX + 1, len - 2);

    }
    setArray(tmpData);
}
 
Example 11
Source File: Socks4Message.java    From T0rlib4j with Apache License 2.0 5 votes vote down vote up
public void read(final InputStream in, final boolean clientMode)
		throws IOException {
	final DataInputStream d_in = new DataInputStream(in);
	version = d_in.readUnsignedByte();
	command = d_in.readUnsignedByte();
	if (clientMode && (command != REPLY_OK)) {
		String errMsg;
		// FIXME: Range should be replaced with cases.
		if ((command > REPLY_OK) && (command < REPLY_BAD_IDENTD)) {
			errMsg = replyMessage[command - REPLY_OK];
		} else {
			errMsg = "Unknown Reply Code";
		}
		throw new SocksException(command, errMsg);
	}
	port = d_in.readUnsignedShort();
	final byte[] addr = new byte[4];
	d_in.readFully(addr);
	ip = bytes2IP(addr);
	host = ip.getHostName();
	if (!clientMode) {
		int b = in.read();
		// FIXME: Hope there are no idiots with user name bigger than this
		final byte[] userBytes = new byte[256];
		int i = 0;
		for (i = 0; (i < userBytes.length) && (b > 0); ++i) {
			userBytes[i] = (byte) b;
			b = in.read();
		}
		user = new String(userBytes, 0, i);
	}
}
 
Example 12
Source File: BufferedTupleQueue.java    From phoenix with Apache License 2.0 5 votes vote down vote up
@Override
protected Tuple readFromStream(DataInputStream in) throws IOException {
    int length = in.readInt();
    if (length < 0) return null;

    byte[] b = new byte[length];
    in.readFully(b);
    Result result = ResultUtil.toResult(new ImmutableBytesWritable(b));
    return new ResultTuple(result);
}
 
Example 13
Source File: SaslRpcClient.java    From hadoop with Apache License 2.0 5 votes vote down vote up
private void readNextRpcPacket() throws IOException {
  LOG.debug("reading next wrapped RPC packet");
  DataInputStream dis = new DataInputStream(in);
  int rpcLen = dis.readInt();
  byte[] rpcBuf = new byte[rpcLen];
  dis.readFully(rpcBuf);
  
  // decode the RPC header
  ByteArrayInputStream bis = new ByteArrayInputStream(rpcBuf);
  RpcResponseHeaderProto.Builder headerBuilder =
      RpcResponseHeaderProto.newBuilder();
  headerBuilder.mergeDelimitedFrom(bis);
  
  boolean isWrapped = false;
  // Must be SASL wrapped, verify and decode.
  if (headerBuilder.getCallId() == AuthProtocol.SASL.callId) {
    RpcSaslProto.Builder saslMessage = RpcSaslProto.newBuilder();
    saslMessage.mergeDelimitedFrom(bis);
    if (saslMessage.getState() == SaslState.WRAP) {
      isWrapped = true;
      byte[] token = saslMessage.getToken().toByteArray();
      if (LOG.isDebugEnabled()) {
        LOG.debug("unwrapping token of length:" + token.length);
      }
      token = saslClient.unwrap(token, 0, token.length);
      unwrappedRpcBuffer = ByteBuffer.wrap(token);
    }
  }
  if (!isWrapped) {
    throw new SaslException("Server sent non-wrapped response");
  }
}
 
Example 14
Source File: FSAgent.java    From Bats with Apache License 2.0 5 votes vote down vote up
public byte[] readFullFileContent(Path path) throws IOException
{
  DataInputStream is = new DataInputStream(fileSystem.open(path));
  byte[] bytes = new byte[is.available()];
  try {
    is.readFully(bytes);
  } finally {
    is.close();
  }
  return bytes;
}
 
Example 15
Source File: RsaKeyHelper.java    From sanshanblog with Apache License 2.0 5 votes vote down vote up
/**
 * 获取公钥
 *
 * @param filename
 * @return
 * @throws Exception
 */
public PublicKey getPublicKey(String filename) throws Exception {
    InputStream resourceAsStream = this.getClass().getClassLoader().getResourceAsStream(filename);
    DataInputStream dis = new DataInputStream(resourceAsStream);
    byte[] keyBytes = new byte[resourceAsStream.available()];
    dis.readFully(keyBytes);
    dis.close();
    X509EncodedKeySpec spec = new X509EncodedKeySpec(keyBytes);
    KeyFactory kf = KeyFactory.getInstance("RSA");
    return kf.generatePublic(spec);
}
 
Example 16
Source File: ValueMetaBase.java    From pentaho-kettle with Apache License 2.0 5 votes vote down vote up
protected byte[] readBinaryString( DataInputStream inputStream ) throws IOException {
  // Read the length and then the bytes
  int length = inputStream.readInt();
  if ( length < 0 ) {
    return null;
  }

  byte[] chars = new byte[length];
  inputStream.readFully( chars );

  return chars;
}
 
Example 17
Source File: ZoneInfoFile.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Loads the rules from a DateInputStream
 *
 * @param dis  the DateInputStream to load, not null
 * @throws Exception if an error occurs
 */
private static void load(DataInputStream dis) throws ClassNotFoundException, IOException {
    if (dis.readByte() != 1) {
        throw new StreamCorruptedException("File format not recognised");
    }
    // group
    String groupId = dis.readUTF();
    if ("TZDB".equals(groupId) == false) {
        throw new StreamCorruptedException("File format not recognised");
    }
    // versions, only keep the last one
    int versionCount = dis.readShort();
    for (int i = 0; i < versionCount; i++) {
        versionId = dis.readUTF();

    }
    // regions
    int regionCount = dis.readShort();
    String[] regionArray = new String[regionCount];
    for (int i = 0; i < regionCount; i++) {
        regionArray[i] = dis.readUTF();
    }
    // rules
    int ruleCount = dis.readShort();
    ruleArray = new byte[ruleCount][];
    for (int i = 0; i < ruleCount; i++) {
        byte[] bytes = new byte[dis.readShort()];
        dis.readFully(bytes);
        ruleArray[i] = bytes;
    }
    // link version-region-rules, only keep the last version, if more than one
    for (int i = 0; i < versionCount; i++) {
        regionCount = dis.readShort();
        regions = new String[regionCount];
        indices = new int[regionCount];
        for (int j = 0; j < regionCount; j++) {
            regions[j] = regionArray[dis.readShort()];
            indices[j] = dis.readShort();
        }
    }
    // remove the following ids from the map, they
    // are exclued from the "old" ZoneInfo
    zones.remove("ROC");
    for (int i = 0; i < versionCount; i++) {
        int aliasCount = dis.readShort();
        aliases.clear();
        for (int j = 0; j < aliasCount; j++) {
            String alias = regionArray[dis.readShort()];
            String region = regionArray[dis.readShort()];
            aliases.put(alias, region);
        }
    }
    // old us time-zone names
    addOldMapping();
}
 
Example 18
Source File: ICUBinary.java    From jdk8u_jdk with GNU General Public License v2.0 4 votes vote down vote up
/**
* <p>ICU data header reader method.
* Takes a ICU generated big-endian input stream, parse the ICU standard
* file header and authenticates them.</p>
* <p>Header format:
* <ul>
*     <li> Header size (char)
*     <li> Magic number 1 (byte)
*     <li> Magic number 2 (byte)
*     <li> Rest of the header size (char)
*     <li> Reserved word (char)
*     <li> Big endian indicator (byte)
*     <li> Character set family indicator (byte)
*     <li> Size of a char (byte) for c++ and c use
*     <li> Reserved byte (byte)
*     <li> Data format identifier (4 bytes), each ICU data has its own
*          identifier to distinguish them. [0] major [1] minor
*                                          [2] milli [3] micro
*     <li> Data version (4 bytes), the change version of the ICU data
*                             [0] major [1] minor [2] milli [3] micro
*     <li> Unicode version (4 bytes) this ICU is based on.
* </ul>
* </p>
* <p>
* Example of use:<br>
* <pre>
* try {
*    FileInputStream input = new FileInputStream(filename);
*    If (Utility.readICUDataHeader(input, dataformat, dataversion,
*                                  unicode) {
*        System.out.println("Verified file header, this is a ICU data file");
*    }
* } catch (IOException e) {
*    System.out.println("This is not a ICU data file");
* }
* </pre>
* </p>
* @param inputStream input stream that contains the ICU data header
* @param dataFormatIDExpected Data format expected. An array of 4 bytes
*                     information about the data format.
*                     E.g. data format ID 1.2.3.4. will became an array of
*                     {1, 2, 3, 4}
* @param authenticate user defined extra data authentication. This value
*                     can be null, if no extra authentication is needed.
* @exception IOException thrown if there is a read error or
*            when header authentication fails.
* @draft 2.1
*/
public static final byte[] readHeader(InputStream inputStream,
                                    byte dataFormatIDExpected[],
                                    Authenticate authenticate)
                                                      throws IOException
{
    DataInputStream input = new DataInputStream(inputStream);
    char headersize = input.readChar();
    int readcount = 2;
    //reading the header format
    byte magic1 = input.readByte();
    readcount ++;
    byte magic2 = input.readByte();
    readcount ++;
    if (magic1 != MAGIC1 || magic2 != MAGIC2) {
        throw new IOException(MAGIC_NUMBER_AUTHENTICATION_FAILED_);
    }

    input.readChar(); // reading size
    readcount += 2;
    input.readChar(); // reading reserved word
    readcount += 2;
    byte bigendian    = input.readByte();
    readcount ++;
    byte charset      = input.readByte();
    readcount ++;
    byte charsize     = input.readByte();
    readcount ++;
    input.readByte(); // reading reserved byte
    readcount ++;

    byte dataFormatID[] = new byte[4];
    input.readFully(dataFormatID);
    readcount += 4;
    byte dataVersion[] = new byte[4];
    input.readFully(dataVersion);
    readcount += 4;
    byte unicodeVersion[] = new byte[4];
    input.readFully(unicodeVersion);
    readcount += 4;
    if (headersize < readcount) {
        throw new IOException("Internal Error: Header size error");
    }
    input.skipBytes(headersize - readcount);

    if (bigendian != BIG_ENDIAN_ || charset != CHAR_SET_
        || charsize != CHAR_SIZE_
        || !Arrays.equals(dataFormatIDExpected, dataFormatID)
        || (authenticate != null
            && !authenticate.isDataVersionAcceptable(dataVersion))) {
        throw new IOException(HEADER_AUTHENTICATION_FAILED_);
    }
    return unicodeVersion;
}
 
Example 19
Source File: ICUBinary.java    From jdk8u-dev-jdk with GNU General Public License v2.0 4 votes vote down vote up
/**
* <p>ICU data header reader method.
* Takes a ICU generated big-endian input stream, parse the ICU standard
* file header and authenticates them.</p>
* <p>Header format:
* <ul>
*     <li> Header size (char)
*     <li> Magic number 1 (byte)
*     <li> Magic number 2 (byte)
*     <li> Rest of the header size (char)
*     <li> Reserved word (char)
*     <li> Big endian indicator (byte)
*     <li> Character set family indicator (byte)
*     <li> Size of a char (byte) for c++ and c use
*     <li> Reserved byte (byte)
*     <li> Data format identifier (4 bytes), each ICU data has its own
*          identifier to distinguish them. [0] major [1] minor
*                                          [2] milli [3] micro
*     <li> Data version (4 bytes), the change version of the ICU data
*                             [0] major [1] minor [2] milli [3] micro
*     <li> Unicode version (4 bytes) this ICU is based on.
* </ul>
* </p>
* <p>
* Example of use:<br>
* <pre>
* try {
*    FileInputStream input = new FileInputStream(filename);
*    If (Utility.readICUDataHeader(input, dataformat, dataversion,
*                                  unicode) {
*        System.out.println("Verified file header, this is a ICU data file");
*    }
* } catch (IOException e) {
*    System.out.println("This is not a ICU data file");
* }
* </pre>
* </p>
* @param inputStream input stream that contains the ICU data header
* @param dataFormatIDExpected Data format expected. An array of 4 bytes
*                     information about the data format.
*                     E.g. data format ID 1.2.3.4. will became an array of
*                     {1, 2, 3, 4}
* @param authenticate user defined extra data authentication. This value
*                     can be null, if no extra authentication is needed.
* @exception IOException thrown if there is a read error or
*            when header authentication fails.
* @draft 2.1
*/
public static final byte[] readHeader(InputStream inputStream,
                                    byte dataFormatIDExpected[],
                                    Authenticate authenticate)
                                                      throws IOException
{
    DataInputStream input = new DataInputStream(inputStream);
    char headersize = input.readChar();
    int readcount = 2;
    //reading the header format
    byte magic1 = input.readByte();
    readcount ++;
    byte magic2 = input.readByte();
    readcount ++;
    if (magic1 != MAGIC1 || magic2 != MAGIC2) {
        throw new IOException(MAGIC_NUMBER_AUTHENTICATION_FAILED_);
    }

    input.readChar(); // reading size
    readcount += 2;
    input.readChar(); // reading reserved word
    readcount += 2;
    byte bigendian    = input.readByte();
    readcount ++;
    byte charset      = input.readByte();
    readcount ++;
    byte charsize     = input.readByte();
    readcount ++;
    input.readByte(); // reading reserved byte
    readcount ++;

    byte dataFormatID[] = new byte[4];
    input.readFully(dataFormatID);
    readcount += 4;
    byte dataVersion[] = new byte[4];
    input.readFully(dataVersion);
    readcount += 4;
    byte unicodeVersion[] = new byte[4];
    input.readFully(unicodeVersion);
    readcount += 4;
    if (headersize < readcount) {
        throw new IOException("Internal Error: Header size error");
    }
    input.skipBytes(headersize - readcount);

    if (bigendian != BIG_ENDIAN_ || charset != CHAR_SET_
        || charsize != CHAR_SIZE_
        || !Arrays.equals(dataFormatIDExpected, dataFormatID)
        || (authenticate != null
            && !authenticate.isDataVersionAcceptable(dataVersion))) {
        throw new IOException(HEADER_AUTHENTICATION_FAILED_);
    }
    return unicodeVersion;
}
 
Example 20
Source File: FASTAReader.java    From gepard with MIT License 4 votes vote down vote up
public static boolean isNucleotideFile(String file) throws IOException, InvalidFASTAFileException {
	
	// get lowercase->uppercase mapper && ACGT checker
	byte[] LCToUC = getUppercaseMapper();
	boolean[] isACGT = getACGTChecker();
	
	// get input stream
	DataInputStream in = new DataInputStream(new FileInputStream(file));
	// read first CHARACTERS_FOR_AUTOMATRIX bytes
	int readbytes = (int)Math.min(CHARACTERS_FOR_AUTOMATRIX, new File(file).length());
	byte[] contents = new byte[readbytes];
	in.readFully(contents, 0, readbytes);
	in.close();
	
	// check for status line
	if (contents.length == 0 || contents[0] != '>')
		// invalid format
		throw new InvalidFASTAFileException("No status line found");
	
	int start=0;
	
	// skip status line      
	while (start < contents.length && contents[start] != 10 && contents[start] != 13) start++;
	// did we find no line break?
	if (start == contents.length) throw new InvalidFASTAFileException("End of FASTA status line could not be identified");
	// one more?
	if (contents[start+1] == 10) start++;
	// and the last one to reach the new line
	start++;
	
	
	
	int totalCount=0, acgtCount=0;
	
	// count ACGT and total characters
	for (int i=start; i<contents.length; i++) {
	
		while (i<contents.length && contents[i] == '>') {
			// ignore status line
			while (i<contents.length && contents[i] != 10 && contents[i] != 13) i++;
			i++;
			// another LF here?
			if (i<contents.length && contents[i] == 10) i++;
		}
		if (i>=contents.length)
			break;
		
	
		if (contents[i] != 13 && contents[i] != 10) {
			if (contents[i]<0)
				throw new InvalidFASTAFileException("Invalid character in FASTA file: " + (char)contents[i]);
			if (isACGT[LCToUC[contents[i]]])
				acgtCount++;
			totalCount++;
		}
	}
	
	// check ACGT/total ratio
	if  ( ((double)acgtCount / (double)totalCount ) >= NUCLEOTIDE_THRESHOLD )
		return true;
	else
		return false;
	
}