本文整理汇总了C#中biz.ritter.javapi类的典型用法代码示例。如果您正苦于以下问题:C# biz.ritter.javapi类的具体用法?C# biz.ritter.javapi怎么用?C# biz.ritter.javapi使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
biz.ritter.javapi类属于命名空间,在下文中一共展示了biz.ritter.javapi类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ZipInputStream
/**
* Constructs a new {@code ZipInputStream} from the specified input stream.
*
* @param stream
* the input stream to representing a ZIP archive.
*/
public ZipInputStream(java.io.InputStream stream)
: base(new java.io.PushbackInputStream(stream, BUF_SIZE), new Inflater(true))
{
if (stream == null) {
throw new java.lang.NullPointerException();
}
}
示例2: OctetStreamData
/**
* Creates a new <code>OctetStreamData</code>.
*
* @param octetStream the input stream containing the octets
* @throws NullPointerException if <code>octetStream</code> is
* <code>null</code>
*/
public OctetStreamData(java.io.InputStream octetStream)
{
if (octetStream == null) {
throw new java.lang.NullPointerException("octetStream is null");
}
this.octetStream = octetStream;
}
示例3: AnnotationTypeMismatchException
/**
* Constructs an instance for the given type element and the type found.
*
* @param element
* the annotation type element.
* @param foundType
* the invalid type that was found. This is actually the textual
* type description found in the binary class representation,
* so it may not be human-readable.
*/
public AnnotationTypeMismatchException(java.lang.reflect.Method element, String foundType)
: base("The annotation element, "+element+", doesn't match the type "+foundType+".")
{
//$NON-NLS-1$
this.elementJ = element;
this.foundTypeJ = foundType;
}
示例4: Write
/// <summary>
/// Write the properties to the output stream.
/// </summary>
/// <param name="stream">The output stream where the properties are written.</param>
/// <param name="comments">Optional comments that are placed at the beginning of the output.</param>
public void Write(java.io.Writer stream, String comments )
{
// Create a writer to output to an ISO-8859-1 encoding (code page 28592).
//StreamWriter writer = new StreamWriter( stream, System.Text.Encoding.GetEncoding( 28592 ) );
java.io.BufferedWriter writer = new java.io.BufferedWriter(stream);
if( comments != null)
{
comments = "# " + comments;
}
writer.write(comments);
writer.newLine();
writer.write( "# " + DateTime.Now.ToString() );
writer.newLine();
writer.flush();
for( IEnumerator e = hashtable.Keys.GetEnumerator(); e.MoveNext(); )
{
String key = e.Current.ToString();
String val = hashtable[ key ].ToString();
writer.write( escapeKey( key ) + "=" + escapeValue( val ) );
writer.newLine();
writer.flush();
}
}
示例5: readFullyAndClose
/**
* Reads all the bytes from the given input stream.
*
* Calls read multiple times on the given input stream until it receives an
* end of file marker. Returns the combined results as a byte array. Note
* that this method may block if the underlying stream read blocks.
*
* @param is
* the input stream to be read.
* @return the content of the stream as a byte array.
* @throws IOException
* if a read error occurs.
*/
public static byte[] readFullyAndClose(java.io.InputStream isJ)
{
// throws IOException {
try {
// Initial read
byte[] buffer = new byte[1024];
int count = isJ.read(buffer);
int nextByte = isJ.read();
// Did we get it all in one read?
if (nextByte == -1) {
byte[] dest = new byte[count];
java.lang.SystemJ.arraycopy(buffer, 0, dest, 0, count);
return dest;
}
// Requires additional reads
java.io.ByteArrayOutputStream baos = new java.io.ByteArrayOutputStream(count * 2);
baos.write(buffer, 0, count);
baos.write(nextByte);
while (true) {
count = isJ.read(buffer);
if (count == -1) {
return baos.toByteArray();
}
baos.write(buffer, 0, count);
}
} finally {
isJ.close();
}
}
示例6: InstantiateFactory
/**
* Constructor that performs no validation.
* Use <code>getInstance</code> if you want that.
*
* @param classToInstantiate the class to instantiate
* @param paramTypes the constructor parameter types, not cloned
* @param args the constructor arguments, not cloned
*/
public InstantiateFactory(java.lang.Class classToInstantiate, java.lang.Class[] paramTypes, Object[] args)
: base()
{
iClassToInstantiate = classToInstantiate;
iParamTypes = paramTypes;
iArgs = args;
findConstructor();
}
示例7: ZOutputStream
public ZOutputStream(java.io.OutputStream outJ)
: base()
{
this.outJ=outJ;
z.inflateInit();
compress=false;
buf = new byte[bufsize];
}
示例8: Manifest
protected internal Manifest(java.io.InputStream isJ, bool readChunks)
{
//throws IOException {
if (readChunks) {
chunks = new HashMap<String, Chunk>();
}
read(isJ);
}
示例9: PredicatedMap
/**
* Factory method to create a typed map.
* <p>
* If there are any elements already in the map being decorated, they
* are validated.
*
* @param map the map to decorate, must not be null
* @param keyType the type to allow as keys, must not be null
* @param valueType the type to allow as values, must not be null
* @throws IllegalArgumentException if list or type is null
* @throws IllegalArgumentException if the list contains invalid elements
*/
public static java.util.Map<Object, Object> decorate(java.util.Map<Object, Object> map, java.lang.Class keyType, java.lang.Class valueType)
{
return new PredicatedMap(
map,
InstanceofPredicate.getInstance(keyType),
InstanceofPredicate.getInstance(valueType)
);
}
示例10: IncompleteAnnotationException
/**
* Constructs an instance with the incomplete annotation type and the name
* of the element that's missing.
*
* @param annotationType
* the annotation type.
* @param elementName
* the name of the incomplete element.
*/
public IncompleteAnnotationException(
java.lang.Class annotationType, String elementName)
: base("The element, "+elementName+", is not complete for the annotation "+annotationType.getName()+".")
{
//$NON-NLS-1$
this.annotationTypeJ = annotationType;
this.elementNameJ = elementName;
}
示例11: getDefaultInstance
public static Session getDefaultInstance(java.util.Properties prop)
{
if (null == instance) {
instance = new Session ();
instance.props = prop;
}
return instance;
}
示例12: TransformerException
/**
* Wrap an existing exception in a TransformerException.
*
* <p>This is used for throwing processor exceptions before
* the processing has started.</p>
*
* @param message The error or warning message, or null to
* use the message from the embedded exception.
* @param e Any exception
*/
public TransformerException(String message, java.lang.Throwable e)
: base(((message == null) || (message.length() == 0))
? e.toString()
: message)
{
this.containedException = e;
this.locator = null;
}
示例13: IllegalFormatConversionException
/**
* Constructs a new {@code IllegalFormatConversionException} with the class
* of the mismatched conversion and corresponding parameter.
*
* @param c
* the class of the mismatched conversion.
* @param arg
* the corresponding parameter.
*/
public IllegalFormatConversionException(char c, java.lang.Class arg)
{
this.c = c;
if (arg == null)
{
throw new java.lang.NullPointerException();
}
this.arg = arg;
}
示例14: BeanDescriptor
/**
* <p>
* Constructs an instance with the bean's {@link Class} and a customizer
* {@link Class}. The descriptor's {@link #getName()} is set as the
* unqualified name of the <code>beanClass</code>.
* </p>
*
* @param beanClass
* The bean's Class.
* @param customizerClass
* The bean's customizer Class.
*/
public BeanDescriptor(java.lang.Class beanClass, java.lang.Class customizerClass)
{
if (beanClass == null)
{
throw new java.lang.NullPointerException();
}
setName(getShortClassName(beanClass));
this.beanClass = beanClass;
this.customizerClass = customizerClass;
}
示例15: FontRenderContext
public FontRenderContext(java.awt.geom.AffineTransform trans, bool antiAliased,
bool usesFractionalMetrics)
{
if (trans != null)
{
transform = new java.awt.geom.AffineTransform(trans);
}
fAntiAliased = antiAliased;
fFractionalMetrics = usesFractionalMetrics;
}