Java Doc for OctetString.java in  » Net » snmp4j » org » snmp4j » smi » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Net » snmp4j » org.snmp4j.smi 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.snmp4j.smi.AbstractVariable
      org.snmp4j.smi.OctetString

All known Subclasses:   org.snmp4j.smi.Opaque,  org.snmp4j.smi.BitString,
OctetString
public class OctetString extends AbstractVariable implements AssignableFromByteArray,AssignableFromString(Code)
The OctetString class represents the SMI type OCTET STRING.
author:
   Frank Fock
version:
   1.8
since:
   1.0



Constructor Summary
public  OctetString()
     Creates a zero length octet string.
public  OctetString(byte[] rawValue)
     Creates an octet string from an byte array.
public  OctetString(byte[] rawValue, int offset, int length)
     Creates an octet string from an byte array.
public  OctetString(String stringValue)
     Creates an octet string from a java string.
public  OctetString(OctetString other)
     Creates an octet string from another OctetString by cloning its value.

Method Summary
public  voidappend(byte b)
     Appends a single byte to this octet string.
public  voidappend(byte[] bytes)
     Appends an array of bytes to this octet string.
public  voidappend(OctetString octetString)
     Appends an octet string.
public  voidappend(String string)
     Appends the supplied string to this OctetString.
public  voidclear()
     Sets the value of the octet string to a zero length string.
public  Objectclone()
    
public  intcompareTo(Object o)
    
public  voiddecodeBER(BERInputStream inputStream)
    
public  voidencodeBER(OutputStream outputStream)
    
public  booleanequals(Object o)
    
public static  OctetStringfromByteArray(byte[] value)
     Creates an OctetString from an byte array.
public static  OctetStringfromHexString(String hexString)
    
public static  OctetStringfromHexString(String hexString, char delimiter)
    
public static  OctetStringfromString(String string, char delimiter, int radix)
    
public static  OctetStringfromString(String string, int radix)
     Creates an OctetString from a string represantation in the specified radix.
public  voidfromSubIndex(OID subIndex, boolean impliedLength)
    
final public  byteget(int index)
     Gets the byte at the specified index.
public  intgetBERLength()
    
public  intgetBERPayloadLength()
     Returns the length of the payload of this BERSerializable object in bytes when encoded according to the Basic Encoding Rules (BER).
public  intgetSyntax()
    
public  byte[]getValue()
    
public  inthashCode()
    
public  booleanisPrintable()
     Determines whether this octet string contains non ISO control characters only.
final public  intlength()
     Gets the length of the byte string.
public  OctetStringmask(OctetString mask)
     Returns a copy of this OctetString where each bit not set in the supplied mask zeros the corresponding bit in the returned OctetString.
final public  voidset(int index, byte b)
     Sets the byte value at the specified index.
public  voidsetValue(String value)
    
public  voidsetValue(byte[] value)
    
final public static  Collectionsplit(OctetString octetString, OctetString delimOctets)
     Splits an OctetString using a set of delimiter characters similar to how a StringTokenizer would do it.
public  booleanstartsWith(OctetString prefix)
     Tests if this octet string starts with the specified prefix.
public  OctetStringsubstring(int beginIndex, int endIndex)
     Returns a new string that is a substring of this string.
public  StringtoASCII(char placeholder)
     Formats the content into a ASCII string.
public  byte[]toByteArray()
    
public  StringtoHexString()
    
public  StringtoHexString(char separator)
    
public  inttoInt()
    
public  longtoLong()
    
public  StringtoString()
    
public  StringtoString(char separator, int radix)
    
public  StringtoString(int radix)
     Returns a string representation of this octet string in the radix specified.
public  OIDtoSubIndex(boolean impliedLength)
    


Constructor Detail
OctetString
public OctetString()(Code)
Creates a zero length octet string.



OctetString
public OctetString(byte[] rawValue)(Code)
Creates an octet string from an byte array.
Parameters:
  rawValue - an array of bytes.



OctetString
public OctetString(byte[] rawValue, int offset, int length)(Code)
Creates an octet string from an byte array.
Parameters:
  rawValue - an array of bytes.
Parameters:
  offset - the position (zero based) of the first byte to be copied fromrawValueinto the new OctetSring.
Parameters:
  length - the number of bytes to be copied.



OctetString
public OctetString(String stringValue)(Code)
Creates an octet string from a java string.
Parameters:
  stringValue - a Java string.



OctetString
public OctetString(OctetString other)(Code)
Creates an octet string from another OctetString by cloning its value.
Parameters:
  other - an OctetString instance.




Method Detail
append
public void append(byte b)(Code)
Appends a single byte to this octet string.
Parameters:
  b - a byte value.



append
public void append(byte[] bytes)(Code)
Appends an array of bytes to this octet string.
Parameters:
  bytes - an array of bytes.



append
public void append(OctetString octetString)(Code)
Appends an octet string.
Parameters:
  octetString - an OctetString to append to this octet string.



append
public void append(String string)(Code)
Appends the supplied string to this OctetString. Calling this method is identical to append(string.getBytes()).
Parameters:
  string - a String instance.



clear
public void clear()(Code)
Sets the value of the octet string to a zero length string.



clone
public Object clone()(Code)



compareTo
public int compareTo(Object o)(Code)



decodeBER
public void decodeBER(BERInputStream inputStream) throws java.io.IOException(Code)



encodeBER
public void encodeBER(OutputStream outputStream) throws java.io.IOException(Code)



equals
public boolean equals(Object o)(Code)



fromByteArray
public static OctetString fromByteArray(byte[] value)(Code)
Creates an OctetString from an byte array.
Parameters:
  value - a byte array that is copied into the value of the createdOctetString or null.an OctetString or null if valueis null.
since:
   1.7



fromHexString
public static OctetString fromHexString(String hexString)(Code)



fromHexString
public static OctetString fromHexString(String hexString, char delimiter)(Code)



fromString
public static OctetString fromString(String string, char delimiter, int radix)(Code)



fromString
public static OctetString fromString(String string, int radix)(Code)
Creates an OctetString from a string represantation in the specified radix.
Parameters:
  string - the string representation of an octet string.
Parameters:
  radix - the radix of the string represantion.the OctetString instance.
since:
   1.6



fromSubIndex
public void fromSubIndex(OID subIndex, boolean impliedLength)(Code)



get
final public byte get(int index)(Code)
Gets the byte at the specified index.
Parameters:
  index - a zero-based index into the octet string.the byte value at the specified index.
throws:
  ArrayIndexOutOfBoundsException - if index < 0 or > OctetString.length().



getBERLength
public int getBERLength()(Code)



getBERPayloadLength
public int getBERPayloadLength()(Code)
Returns the length of the payload of this BERSerializable object in bytes when encoded according to the Basic Encoding Rules (BER). the BER encoded length of this variable.



getSyntax
public int getSyntax()(Code)



getValue
public byte[] getValue()(Code)



hashCode
public int hashCode()(Code)



isPrintable
public boolean isPrintable()(Code)
Determines whether this octet string contains non ISO control characters only. false if this octet string contains any ISO controlcharacters as defined by Character.isISOControl(char)except if these ISO control characters are all whitespace charactersas defined by Character.isWhitespace(char).



length
final public int length()(Code)
Gets the length of the byte string. an integer >= 0.



mask
public OctetString mask(OctetString mask)(Code)
Returns a copy of this OctetString where each bit not set in the supplied mask zeros the corresponding bit in the returned OctetString.
Parameters:
  mask - a mask where the n-th bit corresponds to the n-th bit in the returnedOctetString.the masked OctetString.
since:
   1.7



set
final public void set(int index, byte b)(Code)
Sets the byte value at the specified index.
Parameters:
  index - an index value greater or equal 0 and less than OctetString.length().
Parameters:
  b - the byte value to set.
since:
   v1.2



setValue
public void setValue(String value)(Code)



setValue
public void setValue(byte[] value)(Code)



split
final public static Collection split(OctetString octetString, OctetString delimOctets)(Code)
Splits an OctetString using a set of delimiter characters similar to how a StringTokenizer would do it.
Parameters:
  octetString - the input string to tokenize.
Parameters:
  delimOctets - a set of delimiter octets.a Collection of OctetString instances that contain the tokens.



startsWith
public boolean startsWith(OctetString prefix)(Code)
Tests if this octet string starts with the specified prefix.
Parameters:
  prefix - the prefix.true if the bytes of this octet string up to the lengthof prefix equal those of prefix.
since:
   1.2



substring
public OctetString substring(int beginIndex, int endIndex)(Code)
Returns a new string that is a substring of this string. The substring begins at the specified beginIndex and extends to the character at index endIndex - 1. Thus the length of the substring is endIndex-beginIndex.
Parameters:
  beginIndex - the beginning index, inclusive.
Parameters:
  endIndex - the ending index, exclusive.the specified substring.
since:
   1.3



toASCII
public String toASCII(char placeholder)(Code)
Formats the content into a ASCII string. Non-printable characters are replaced by the supplied placeholder character.
Parameters:
  placeholder - a placeholder character, for example '.'.the contents of this octet string as ASCII formatted string.
since:
   1.6



toByteArray
public byte[] toByteArray()(Code)



toHexString
public String toHexString()(Code)



toHexString
public String toHexString(char separator)(Code)



toInt
public int toInt()(Code)



toLong
public long toLong()(Code)



toString
public String toString()(Code)



toString
public String toString(char separator, int radix)(Code)



toString
public String toString(int radix)(Code)
Returns a string representation of this octet string in the radix specified. There will be no separation characters, but each byte will be represented by round(log(256)/log(radix)) digits.
Parameters:
  radix - the radix to use in the string representation.a string representation of this ocetet string in the specified radix.
since:
   1.6



toSubIndex
public OID toSubIndex(boolean impliedLength)(Code)



Fields inherited from org.snmp4j.smi.AbstractVariable
final public static String SMISYNTAXES_PROPERTIES(Code)(Java Doc)

Methods inherited from org.snmp4j.smi.AbstractVariable
abstract public Object clone()(Code)(Java Doc)
abstract public int compareTo(Object o)(Code)(Java Doc)
public static Variable createFromBER(BERInputStream inputStream) throws IOException(Code)(Java Doc)
public static Variable createFromSyntax(int smiSyntax)(Code)(Java Doc)
abstract public void decodeBER(BERInputStream inputStream) throws IOException(Code)(Java Doc)
abstract public void encodeBER(OutputStream outputStream) throws IOException(Code)(Java Doc)
abstract public boolean equals(Object o)(Code)(Java Doc)
abstract public void fromSubIndex(OID subIndex, boolean impliedLength)(Code)(Java Doc)
abstract public int getBERLength()(Code)(Java Doc)
public int getBERPayloadLength()(Code)(Java Doc)
abstract public int getSyntax()(Code)(Java Doc)
public static int getSyntaxFromString(String syntaxString)(Code)(Java Doc)
public static String getSyntaxString(int syntax)(Code)(Java Doc)
final public String getSyntaxString()(Code)(Java Doc)
abstract public int hashCode()(Code)(Java Doc)
public boolean isDynamic()(Code)(Java Doc)
public boolean isException()(Code)(Java Doc)
abstract public int toInt()(Code)(Java Doc)
abstract public long toLong()(Code)(Java Doc)
abstract public String toString()(Code)(Java Doc)
abstract public OID toSubIndex(boolean impliedLength)(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.