/* */ package quicktime.vr;
/* */
/* */ import quicktime.QTException;
/* */ import quicktime.QTSession;
/* */ import quicktime.util.QTPointerRef;
/* */
/* */ public final class QTVRString extends QTPointerRef
/* */ {
/* 38 */ private static boolean apriori = QTSession.apriori();
/* */
/* */ public QTVRString(String paramString)
/* */ throws QTException
/* */ {
/* 45 */ super(4 + paramString.length(), true);
/* 46 */ setShortAt(0, (short)0);
/* 47 */ setShortAt(2, (short)paramString.length());
/* 48 */ System.arraycopy(paramString.getBytes(), 0, getBytes(), 4, paramString.length());
/* */ }
/* */
/* */ public QTVRString(byte[] paramArrayOfByte)
/* */ throws QTException
/* */ {
/* 56 */ super(paramArrayOfByte.length, true);
/* 57 */ if (paramArrayOfByte.length < 4) throw new QTException(-50);
/* 58 */ int i = (short)(((short)paramArrayOfByte[2] << 8) + (short)paramArrayOfByte[3]);
/* 59 */ if (4 + i != paramArrayOfByte.length) throw new QTException(-50);
/* 60 */ System.arraycopy(paramArrayOfByte, 0, getBytes(), 0, paramArrayOfByte.length);
/* */ }
/* */
/* */ public short getStringUsage()
/* */ {
/* 67 */ return getShortAt(0);
/* */ }
/* */
/* */ public void setStringUsage(short paramShort)
/* */ {
/* 72 */ setShortAt(0, paramShort);
/* */ }
/* */
/* */ public short getStringLength()
/* */ {
/* 77 */ return getShortAt(2);
/* */ }
/* */
/* */ public String getString()
/* */ {
/* 82 */ int i = getShortAt(2);
/* 83 */ byte[] arrayOfByte = new byte[i];
/* 84 */ getBytesAt(4, i, arrayOfByte, 0);
/* 85 */ return new String(arrayOfByte);
/* */ }
/* */
/* */ public String toString()
/* */ {
/* 90 */ return getClass().getName() + "[" + getString() + "]";
/* */ }
/* */ }
/* Location: Z:\System\Library\Java\Extensions\QTJava.zip
* Qualified Name: quicktime.vr.QTVRString
* JD-Core Version: 0.6.2
*/