/** Report an instance of invalidity. */ protected void reportInvalid(String s, RepInfo info) { info.setMessage(new ErrorMessage(s)); info.setValid(false); }
/** Returns the names of the map locations. * The returned * value is an array whose length equals the number of * channels and whose elements correspond to channels 0, 1, * etc. */ public String[] getMapLocations() { return _curFace.getFaceRegion(0).getMapLocations(); }
public static Rational readUnsignedRational (RandomAccessFile file, boolean endian) throws IOException { long n = readUnsignedInt (file, endian); long d = readUnsignedInt (file, endian); return new Rational (n, d); }
protected void setupDataStream(final InputStream stream, final RepInfo info) { /* Are checksums requested and ensure they're not already calculated * when handling a temp file. */ if (_je.getChecksumFlag() && info.getChecksum().isEmpty()) { _ckSummer = new Checksummer (); _cstream = new ChecksumInputStream (stream, _ckSummer); _dstream = getBufferedDataStream (_cstream, _app != null ? _je.getBufferSize () : 0); } else { _dstream = getBufferedDataStream (stream, _app != null ? _je.getBufferSize () : 0); } }
public static final Agent newW3CInstance() { Builder builder = new Builder("Word Wide Web Consortium", AgentType.NONPROFIT) .address( "Massachusetts Institute of Technology, " + "Computer Science and Artificial Intelligence Laboratory, " + "32 Vassar Street, Room 32-G515, " + "Cambridge, MA 02139") .telephone("(617) 253-2613").fax("(617) 258-5999") .web("http://www.w3.org/"); return builder.build(); }
public static Rational readUnsignedRational (DataInputStream stream, boolean endian, ModuleBase counted) throws IOException { long n = readUnsignedInt (stream, endian, counted); long d = readUnsignedInt (stream, endian, counted); return new Rational (n, d); }
public static Rational readSignedRational (RandomAccessFile file, boolean endian) throws IOException { long n = readSignedInt (file, endian); long d = readSignedInt (file, endian); return new Rational (n, d); }
/** Sets the start time in samples. * This affects the current face and its first FaceRegion. */ public void setStartTime (long samples) { _curFace.setStartTime (samples); _curFace.getFaceRegion(0).setStartTime (samples); }
/** Sets the duration in samples. * This affects the current face and its first FaceRegion. */ public void setDuration (long duration) { _curFace.setDuration (duration); _curFace.getFaceRegion(0).setDuration (duration); }
/** Sets the array of channel map locations. The length * of the array must equal the number of channels. */ public void setMapLocations (String[] locations) { _curFace.getFaceRegion(0).setMapLocations (locations); }
/** * Return leading characters to pad out the byte offset to field width. * @param os Byte offset * @param width Field width * @return String of leading zeros */ protected static String leading (long os, int width) { return leading (os, width, '0'); }
/** Sets the starting time. This will be converted * into a TimeDesc. */ @Override public void setStartTime (long samples) { _startTime = new TimeDescImpl (samples); }
/** Set the bitrate reduction information to null (no compression). */ public void clearBitrateReduction () { _curFormatRegion.clearBitrateReduction (); }
/** Sets the word size. */ public void setWordSize (int wordSize) { _curFormatRegion.setWordSize (wordSize); }
@Override public void actionPerformed (ActionEvent e) { _base.abort (); } };
/** Reports a duplicate chunk. */ protected void dupChunkError(RepInfo info, String chunkName) { info.setMessage(new ErrorMessage(MessageConstants.ERR_CHUNK_DUP + chunkName, _nByte)); info.setValid(false); }
public static Rational readSignedRational (DataInputStream stream, boolean endian, ModuleBase counted) throws IOException { long n = readSignedInt (stream, endian, counted); long d = readSignedInt (stream, endian, counted); return new Rational (n, d); }
/** * Return leading characters to pad out the string to field width. * @param s String * @param width Field width * @return String of leading characters */ protected static String leading (String s, int width) { return leading (s, width, '0'); }
/** Sets the duration. This will be converted * into a TimeDesc. */ @Override public void setDuration (long samples) { _duration = new TimeDescImpl (samples); }
protected void dupChunkError (RepInfo info, String chunkName) { info.setMessage (new ErrorMessage (MessageConstants.ERR_MULTI_CHUNK_NOT_PERM + chunkName + MessageConstants.ERR_MULTI_CHUNK_NOT_PERM_2, _nByte)); info.setValid (false); } }