Writes a {@code TAG_Short_Array} tag.

@param tag The tag.
@throws java.io.IOException if an I/O error occurs.
425910
private void writeShortArrayTagPayload(ShortArrayTag tag) throws IOException {
        short[] shorts = tag.getValue();
        os.writeInt(shorts.length);
        for (int i = 0; i < shorts.length; i++) {
            os.writeShort(shorts[i]);
        }
    }
1265749
public static void w(String tag, String msg) {
        if (sLevel > LEVEL_WARNING) {
            return;
        }
        Log.w(tag, msg);
    }
157139
public void setTags(java.util.Collection<Tag> tags) {
        if (tags == null) {
            this.tags = null;
            return;
        }

        this.tags = new java.util.ArrayList<Tag>(tags);
    }
523983
public void cancelTag(@NonNull Object tag) {
    checkMain();
    checkNotNull(tag, "tag == null");

    List<Action> actions = new ArrayList<>(targetToAction.values());
    //noinspection ForLoopReplaceableByForEach
    for (int i = 0, n = actions.size(); i < n; i++) {
      Action action = actions.get(i);
      if (tag.equals(action.getTag())) {
        cancelExistingRequest(action.getTarget());
      }
    }

    List<DeferredRequestCreator> deferredRequestCreators =
        new ArrayList<>(targetToDeferredRequestCreator.values());
    //noinspection ForLoopReplaceableByForEach
    for (int i = 0, n = deferredRequestCreators.size(); i < n; i++) {
      DeferredRequestCreator deferredRequestCreator = deferredRequestCreators.get(i);
      if (tag.equals(deferredRequestCreator.getTag())) {
        deferredRequestCreator.cancel();
      }
    }
  }
624880
public void property(final QName tag, final Reader val) throws IOException {
    blanks();
    openTagSameLine(tag);
    writeContent(val, wtr);
    closeTagSameLine(tag);
    newline();
  }
369574
public void addTag(IccTag tag) {
    tags.add(tag);
    hashTagsId.put(tag.signature, tag);
    Tag t = TiffTags.getTag(tag.signature);
    if (t != null)
      hashTagsName.put(t.getName(), tag);
  }
1236847
public void setTags(java.util.Collection<java.util.Map<String, String>> tags) {
        if (tags == null) {
            this.tags = null;
            return;
        }

        this.tags = new java.util.ArrayList<java.util.Map<String, String>>(tags);
    }
766513
@SuppressWarnings ("unchecked")
    private void writeListTagPayload(ListTag<?> tag) throws IOException {
        Class<? extends Tag<?>> clazz = tag.getElementType();
        List<Tag<?>> tags = (List<Tag<?>>) tag.getValue();
        int size = tags.size();

        os.writeByte(TagType.getByTagClass(clazz).getId());
        os.writeInt(size);
        for (Tag<?> tag1 : tags) {
            writeTagPayload(tag1);
        }
    }
1281882
public void writeTags() throws FileNotFoundException, IOException
	{
		RandomAccessFile raf = null;
		try
		{
			raf = new RandomAccessFile(mp3File, "rw");
			// Write out id3v2 first because if the filesize is changed when an
			// id3v2 is written then the id3v1 may be moved away from the end
			// of the file which would cause it to not be recognized.
			if (id3v2.tagExists())
			{
				id3v2.writeTag(raf);
			}
			if (id3v1.tagExists())
			{
				id3v1.writeTag(raf);
			}
		}
		finally
		{
			if (raf != null) raf.close();
		}
	}
979853
public void addTag(TagValue tag) {
    //int pos = 0;
    //while (pos < tags.size() && tags.get(pos).getId() < tag.getId()) pos++;
    //tags.add(pos, tag);
    tags.add(tag);
    if (!hashTagsId.containsKey(tag.getId())) {
      hashTagsId.put(tag.getId(), tag);
    }
    Tag t = TiffTags.getTag(tag.getId());
    if (t != null) {
      if (hashTagsName.containsKey(t.getName())) {
        hashTagsName.put(t.getName(), tag);
      }
    }
  }
278035
public static void writeShort(byte b[], int offset, short value) {
    b[offset++] = (byte) (value >>> 8);
    b[offset] = (byte)value;
  }
51068
public void setTags(String tags) {
                if (GitTaskUtils.isNullOrBlankString(tags)) {
                        throw new BuildException("Invalid tag names provided.");
                }

                this.tags = tags.split(",");
        }
410878
@NullSafe
  public static void dumpStack(String tag) {
    Thread currentThread = Thread.currentThread();
    System.err.printf("%1$s - %2$s Thread @ %3$d%n", String.valueOf(tag).toUpperCase(), currentThread.getName(),
      currentThread.getId());
    Thread.dumpStack();
  }
1273213
public void addTag(String tag) {
        if (this.tags == null) {
            tags = new ArrayList<String>();
        }
        this.tags.add(tag);
    }
872408
@SuppressWarnings("unchecked")
    public T addTag(String tag) {
        if (this.tags_ == null) {
            tags_ = new ArrayList<>();
        }
        this.tags_.add(tag);
        return (T) this;
    }
661873
public void setTags(java.util.Collection<String> tags) {
        if (tags == null) {
            this.tags = null;
            return;
        }

        this.tags = new java.util.ArrayList<String>(tags);
    }
933796
public void writeTags(Writer writer, boolean useLemmas, boolean useNormNer, boolean useNerTags) throws IOException {
        for (int i=0; i<tokens.size(); i++) {
            AgigaToken tok = tokens.get(i);
            if (useNormNer && tok.getNormNer() != null) {
                require(prefs.readNormNer, 
                        "AgigaPrefs.readNormNer must be true if useNormNer=true for writeTags()");
                writer.write(tok.getNormNer());
            } else if (useLemmas) {
                require(prefs.readLemma, 
                        "AgigaPrefs.readLemma must be true if useLemmas=true for writeTags()");
                writer.write(tok.getLemma());
            } else {
                require(prefs.readWord, 
                        "AgigaPrefs.readWord must be true if useLemmas and useNormNer are false for writeTags()");
                writer.write(tok.getWord());                
            }
            writer.write("/");
            if (useNerTags) {
                require(prefs.readNer,
                        "AgigaPrefs.readNer must be true if useNerTags=true for writeTags()");
                if (prefs.strict) { 
                    writer.write(tok.getNerTag());
                } else {
                    if (tok.getNerTag() != null) {
                        writer.write(tok.getNerTag());
                    } else {
                        log.warning("Missing NER annotation written as '__MISSING_NER_ANNOTATION__'");
                        writer.write("__MISSING_NER_ANNOTATION__");
                    }
                }
            } else {
                require(prefs.readPos,
                        "AgigaPrefs.readPos must be true if useNerTags=false for writeTags()");
                writer.write(tok.getPosTag());
            }
            if (i < tokens.size()-1) {
                writer.write(" ");
            }
        }
        writer.write("\n");
    }