Developer Area

Changeset 587 for apps

Show
Ignore:
Timestamp:
11/27/09 09:31:48 (4 years ago)
Author:
jonmaycock
Message:

Minor tweak to TXT parsing

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • apps/blackberry/branches/1.5/blackberry/src/org/telnic/blackberry/dns/DNSInputStream.java

    r566 r587  
    3838 * 
    3939 * @author John Cundall, Ben Dowling, Jonathan Maycock 
    40  * @version $Id: DNSInputStream.java,v 1.19 2009/11/06 11:55:58 jm2 Exp $ 
     40 * @version $Id: DNSInputStream.java,v 1.20 2009/11/27 09:10:09 jm2 Exp $ 
    4141 */ 
    4242public class DNSInputStream extends ByteArrayInputStream 
     
    427427    { 
    428428        position = 0; 
    429         final String txtStr = readString();         
     429        String txtStr = readString();         
    430430         
    431431        if (txtStr.trim().equals( KEYWORD )) 
     
    466466             
    467467            if (type.equals( DOMAIN_DISPLAY )) 
    468             {                 
    469                 return new DNSTxtDDSResourceRecord( ttl, txtStr, readString(), version.equals( "1" ) ); 
     468            {            
     469                String dds = readString(); 
     470                while (position < rrBytes) 
     471                { 
     472                    readString();               
     473                } 
     474                return new DNSTxtDDSResourceRecord( ttl, txtStr, dds, version.equals( "1" ) ); 
    470475            } 
    471476            else if (type.equals( TSM_PRIVATE_DATA_AVAILABLE )) 
     
    538543        else 
    539544        { 
     545            while (position < rrBytes) 
     546            { 
     547                txtStr += readString(); 
     548            } 
    540549            return new DNSTxtHeaderResourceRecord( ttl, txtStr ); 
    541550        } 
Telnic
Search This Site
Partners
Neustar
ICANN
Main site | WHOIS | Sell .tel | FAQ | Archived Site | About Telnic | Contact Us